cos-archives / hgrid

[UNMAINTAINED] A Javascript-based hierarchical grid that can be used to manage and organize file/folder-like data
Apache License 2.0
23 stars 14 forks source link

Use batch updates for HGrid#addData. #98

Closed jmcarp closed 10 years ago

jmcarp commented 10 years ago

Lazy-loading lots of data is potentially very slow, since the DataView updates after each addition. Use DataView#beginUpdate and DataView#endUpdate for faster lazy-loading.

brianjgeiger commented 10 years ago

Ooh, you are my new favorite person. Will I need to change anything in the Project Organizer code, or does it all happen at the HGrid level? Sounds like I need to do the stuff you mention above.

jmcarp commented 10 years ago

If I'm understanding this correctly, you shouldn't have to change anything. HGrid#_lazyLoad calls HGrid#addData, which now wraps all updates in SlickGrid's batch update logic. Your custom fetchSuccess callback seems plenty fast as-is.

brianjgeiger commented 10 years ago

Awesome.