Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Table sorting slow

We have an application requires sorting on a table view (sorting on 4 different columns). I know that there is not a build-in sorting on the table view itself.

So, I use the SQLite db to create a database, insert the data into the database and dynamically generate the query to do the sorting. And then bind to the titanium table view. But the result is slow. For example, it is using 8 seconds on a 3G network to load 35 records onto the table.

I have also tried using the quick sort in the javascript code, but the results is even slower.

Does anyone encounter the same issue and has done something like that? Does anyone has implemented something does sorting really fast?

Thanks in advance.

— asked October 15th 2010 by Victor Vector
  • database
  • iphone
  • javascript
0 Comments

1 Answer

  • What does your javascript sort look like? I am using one that is sorting around 200 rows of data and it happens in well under one second.

    — answered October 16th 2010 by John McKnight
    permalink
    1 Comment
    • John - can you sort your sorting algorithm?

      Also - if I sort data tied to a TableView - will the TableView automatically update the order of table rows based on the sort, or will I have to recreate a new TableView based on the re-sorted data, or will I have to update each row in the TableView with the newly sorted data? I'm hoping for the first…

      — commented December 30th 2010 by Takahito Torimoto
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.