← Back to team overview

ubuntu-phone team mailing list archive

Re: [Ubuntu-touch-coreapps] [RSS - Reader] Performance issue in QtQuick.LocalStorage 2.0

 

For what it's worth U1Db is 99% declarative API and documents as well as
queries use JSON syntax. Except for the scripting you need to add or
delete items.
I can't speak for the best way to parse RSS or ATOM but as my rule of
thumb I would hesitate to recommend C++ first thing for a new application.

U1Db can also be used in addition to another storage mechanism just for
sync of course, whichever works out best.

ciao,
    Christian

On 13.06.2013 13:39, Michael Zanetti wrote:
> At the risk that some people don't like to hear this, I would highly recommend 
> to write the actual feed fetching and database storing part in C++/Qt and only 
> expose a well defined model containing the RSS feeds to QML. Maybe one model 
> per feed source or something like that.
>
> Writing all that SQL query stuff in javascript will end up being more complex 
> and fail prone than writing a simple QML plugin in Qt. 
>
> On Thursday 13 June 2013 11:34:59 Joey Chan wrote:
>> I'm a developer of RSS reader, I found a performance issue in qml database,
>> which blocks the main thread for seconds.
>>
>> *issue description:*
>> <code>
>> dbResult = tx.executeSql('INSERT INTO article (title, link, description,
>> pubdate, guid, feed_id) VALUES(?, ?, ?, ?, ?, ?)',
>>                                  [title , link, description, pubdate, guid,
>> feed_id])
>> </code>
>> I use this code to insert a row of data into database, if just one row
>> needed, ok with that; but if I need many rows of data to be insert, the
>> database engine will execute this code many times and blocks the main
>> thread for seconds.
>>
>> *solution: *
>> 1. WorkScript.  not support .import includes QtQuick.LocalStorage 2.0   >_<
>> 2. binding or batch execute.  In Qt C++, a list can be binded to a
>> QSqlQuery, then only execute once to insert them into database, can anyone
>> teach how to do that in qml?
>> 3. U1DB. I haven't tried it, is it stable now?


Attachment: signature.asc
Description: OpenPGP digital signature


References