javascript - Phonegap Database Call Too Slow -


I have developed a phonegap application that shows me all the rows in the table. There are approximately 9,000 lines in this table, and the repetition of these elements is really slow, it takes around 20 seconds to get it

This is part of the code:

 < Code> function getProducts () {var query = "name from selection table"; Db.transaction (function (tx) {tx.executeSql (query, [], function (tx, result) {var len = results.rows.length; if (len == 0) {hide waitingMessage (); $ (' #adend ("& lt; li data-theme = 'E' & gt; & lt; h3 & gt; no item & lt; / h3 & gt; & lt; / li & gt;"); & amp; "
  • One onClick = 'goToProduct ()' & gt; & lt; h3 & gt; + + + (+ & lt; l3; gt; Results.rows.item (i) .name + "& Lt; / h3 & gt; & lt; / a & gt; & lt; / li & gt;"};} Hide waiting message ();} $ ('# elementList'). Listview ('refresh' );}, Callback);}, callback);} is very simple, it works, but is very slow. Speed ​​it for any suggestion?
  • Ijhvibl list takes jquery mobile over time to see so you can use a simple list of user-defined style - it will load in better time


    Comments

    Popular posts from this blog

    ios - How do I use CFArrayRef in Swift? -

    eclipse plugin - Run java code error: Workspace is closed -

    c - Error on building source code in VC 6 -