07-15-2013 05:50 PM
Has anybody done any testing on this?
I need to read ALL the data that is being stored on disk into memory.
I load a fairly large data set, from disk, when the app I'm working on starts, and it can take 5-10 seconds for the data to load. Right now the data is stored as XML, but I could convert it to whatever is the quickest to access. I suspect another DataAccess type might be faster.
Any info is appreciated.
07-15-2013 06:04 PM
07-15-2013 06:11 PM
The data is pretty typical. Technically the data is relational, but that's mostly irrelevant since all the "joins" would be done in C++ code, not using an SQL query (whether that is a good idea or not is questionable, but that is the case and I don't want to rewrite someone else's code).
Basically I'm loading thousands of records that each contain about 5-10 fields. The types of the fields are exclusively int and string.
07-15-2013 06:32 PM
07-16-2013 02:43 AM
using JSonDataAccess with some thousands of records I also got very fast results.
but it's still on my ToDo to write an alternate impl using SQLite to compare speed and memory-consumation
09-10-2013 03:15 AM
Depends on your data , for me , as most of my data have attributes that may not exist for different objects of the same kind , i use JSON for storing data to have the nosql effect. Conversely, if u have a fixed object data format , sql would most probably be the fatest
09-10-2013 03:27 AM
09-10-2013 03:58 AM
i would suggest to not use sqldataaccess but qsqlquery, it allows to set forwardonly=true on select statements which improves the speed quite a lot. you can also wrap multiple statements into one transaction.
sqldataaccess also has a weakness in not returning the id after an insert (i reported that as a bug in jira)
i got a speed increase up to factor 10, so i rewrote my whole persistence level (20k lines of code).
wow - factor 10 - are there sample apps using qsqlquery ?
in most cases I'm in luck to deal with GroupDataModels and JSON - getting great performance and easy development because of easy mapping from JSON Object to QVariantMap from C++ to JS Object in QML and JSON Array to QVariantList in C++ to JS Array in QML.
09-10-2013 04:12 AM
09-10-2013 04:17 AM
I would be interested in your test results comparing json and sqlite.
I'm working on the native BlackBerry10 Library for Kinvey.com baas - there I will implement caching with JSON vs SQLite ... so it would be a good candidate to compare both
... but will take some weeks - just have to finish an important project ;-)
... then finish my slides for BBJam Asia
... then spend a week in Hong Kong
so to be realistic: can do comparison in october