I am working on a code which requires me to store 60*4 boolean values, the titles for these values are being stored in a plist. I require to manipulate the boolean values at runtime and couldn't find a way to update the plist file easily..also using sqlite database for storing the boolean values becomes hectic for such large amount of data...Is there any simple way through which I can store and retrieve these values easily both at runtime and after the application starts?
I don't mean to be a heretic, but there's a simple rule for cases like this: premature optimization is the root of all evil.
60*4 is only 240 booleans. Even if you somehow manage to store them in the worst possible way and take 1k per boolean, that's still only 240k. As long as that's storage rather than RAM, who cares? Why not start with the simplest possible way and fix it when something comes to you later? SQLite would be perfectly fine for this.
If you're close to shipping and have identified this as a problem, by all means ignore this answer. :)
While its going to be much easier to use NSArray or NSMutableArray as mentioned above, you could look at using the standard C++ vector class. AFAIK this is very space-efficient wrt. the allocation of memory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With