Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Poor performance inserting into sorted tables #126

Description

@gbeaty

I've been evaluating a number of different table/grid systems for their performance upserting data in real-time, especially on mobile devices.

I made this benchmark for Backgrid. 9 columns, 100 rows:
https://gist.github.com/gbeaty/981f91592eec8cf6f222

Obviously it does a bit more than just manipulate the table, but in backgrid's case there isn't a lot of other boilerplate to affect things. Just a JSON.parse() call.

On my i7, I get unsorted upsert times of about 3.5 ms, and sorted times of 280 ms.
On my Samsung Note 2 phone, those numbers are 24 ms and 1900 ms.

For comparison's sake, on i7 / Note 2:
DataTables sorted: 11.5 ms / 122 ms (sorting had no effect)
SlickGrid unsorted: 0.06 ms / 0.5 ms
SlickGrid sorted: 0.5 ms / 3.6 ms

I'm using Chrome for all benchmarks.

SlickGrid uses array.sort(), and supports batch inserts, edits, whatever, so many things can be changed before a re-sort.

Did I mis-use the Backgrid or Backbone APIs to achieve these #s?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions