[Qt-qml] QtJsonDb QML API review

jamey.hicks at nokia.com jamey.hicks at nokia.com
Mon Nov 28 14:15:56 CET 2011


On Nov 25, 2011, at 8:23 AM, Saether Jan-Arve (Nokia-MP-Qt/Oslo) wrote:

> ext jamey.hicks at nokia.com wrote on 2011-11-22:
>> 
>> We designed JsonDb with restricted memory devices. One of our
>> strategies is to minimize the amount of memory required by daemons so
>> that applications have more memory available.  Sorting objects in the
>> daemon takes memory proportional to the number of items matching the
>> query, even if fewer items are requested. We decided to make the
>> design decision that any application that needs to dynamically sort a
>> query response does so in the application process, so that the amount
>> of memory needed in the daemon is minimized.
> 
> But the daemon has the index, which is indexed by a sort key. If sorting
> is done by the application, it cannot utilize the index. If sorting is 
> done by the daemon, it can at least use the index itself to retrieve 
> the sorted data. It should also be possible to return the reverse order
> of the index quite efficiently inside the daemon.
> Or is this already the case?
> 

Yes, the index can be used in the daemon for forward and reverse sorted queries. 

If there is no index matching the desired sort order, then all matching entries need to be read and sorted dynamically, and this would be a client side operation. Note that client-side reads are being implemented now, and this blurs the line between server-side and client-side operation.

Jamey




More information about the Qt-qml mailing list