Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    ListGrid with presorted data

    Hi,

    I have a list grid where I set static data via setData(record_array). My data contains 80000 rows, is presorted by one column, and I want to reflect this fact in UI, but without calling setSort/sort APIs, as they do a costly resort - about 18 seconds in my browser.

    I've already tried:
    • creating a local DataSource, setting data via ResultSet with my records in allRows, and sortSpecifiers set to the same value as my grid
    • using displaySort API - which according to docs should work for me, but apparently does nothing with passed list of sort spoecifiers

    For now I've disabled sorting, but I would like to know whether it is possible to make my list appear sorted.

    #2
    After some profiling I found out that we overwrote Array.compareAscending and Array.compareDescending by copying original code and adding locale parameter to localeCompare, to make sure that our application sorts in predictable way, regardless of user's OS and its settings. I was able to get my time down to 500 ms by using Intl.Collator. If possible, I would still like to shave off these 500 ms by skipping superfluous sort when filling grid with sorted data.

    Comment

    Working...
    X