Storing more than 5 thousand row of data in tinyDB

I’m trying to save the data I get from the Sheets. there are 5044 rows of data with 3 columns namely ID, Lat, Long.
I tried to save it to tinyDB, but it only stored 2520 data. I have tried it several times but it’s still like that.

https://groups.google.com/g/mitappinventortest/c/AX1gPrAcuvY/m/2PWHn_NxrrsJ

What is the maximum number of tags TinyDB can store?
Under the hood, TinyDB is implemented in terms of android.content.SharedPreferences. According to this Stack Overflow post, share preferences are represented as an XML file stored in /data/data/[package name]/shared_prefs/[app name].xml . So the only space limitations involved are whether the device can store this file . There is no inherent limit on the number of tags.
What is the maximum size (length, number of characters) of each tag’s content?
The content of each tag (which can be an arbitrary value) is converted to JSON and is stored as a string. As in the answer to question #1, there is no inherent limitation on the size of this string.

Why are you using a timer while storing the content?

1 Like

because it freezes when I use the for each loop directly without a timer

Are you sure all data is in “response Content”. Did you test that?

I did a little test. tinydb will happily handle 5000 records with listed data, but as you have found you will need to work out how much time tinydb/the device needs to create each record. As you can see in my test I had a 100ms interval, which was sufficient to generate the 5000 tags and data

1 Like

let me suggest you to use the SQlite component for that
https://docs.kodular.io/components/storage/sqlite/
Taifun

3 Likes

Why don’t you use SQLite?