TableStore - billbreit/BitWiseApps GitHub Wiki
New page ... under construction.
THe RPZeroClub demo consumes about 50K ( after many rounds of forced gc collection ) on RP Pico and about 54K on the ESP32.
In a db test script importing the RPZeroClub DB class, creating an instance and doing a db.load_all, the memory runs at 60K on the Pico and 132K on the ESP32 ????
Garbage collection ( gc ) is a mysterious beast.
After dumping all the tables to lists of namedtuples and deleting the original database and the DataStore class, the difference was reported at somewhere around 3-5K. The low number is hard to believe, the high may be too low, but apparently an instance of DataStore and seven TableStores ( class hierarchy ListStore->TupleStore->TableStore ) is consuming less than 6K (8K?) of memory - that is, 6K more than the same data in lists of named tuples, which I take to be fairly optimal.
Looked at from the another direction, a non-trivial collection of data in a DataStore structure consumes about 90% of total memory used. Good news for the original project objectives. :-)
The ESP32 has a 'bdev' object that represents the storage device, optimized apparently ( with a 60K buffer ? ). The load part of the timeline is noticeably faster than the RP Pico.
I still can't explain the 10K creep on the Pico. Heap allocation ?