There is a game in which, for example, 20 different user game resources. The number of them constantly (every 1-5 seconds) varies.
Question: What is the best way to store them and how often to save them?
My assumptions:
- Every time to write resources in SharedPreference.
- Every time to write resources in SQLite.
- Store resources in some singleton and in onPause save them in SharedPreference / SQLite.
But on the first two points, it seems to me that the record will be slow in SharedPreference / SQLite. (?)
Who has experience in this - please share what is the best way to organize it?