Hi Geeks,

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?


Thanks,
Joey
-- 
Mailing list: https://launchpad.net/~ubuntu-phone
Post to     : ubuntu-phone@lists.launchpad.net
Unsubscribe : https://launchpad.net/~ubuntu-phone
More help   : https://help.launchpad.net/ListHelp

Reply via email to