Opened 13 years ago
Closed 12 years ago
#7452 closed defect (worksforme)
Destroying a large DataGrid takes a painful amont of time - but only on FireFox
Reported by: | enzo | Owned by: | Bryan Forbes |
---|---|---|---|
Priority: | high | Milestone: | 1.2 |
Component: | DojoX Grid | Version: | 1.1.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
I noticed that calling the destroy() method on a large DataGrid? that has been already inspected (I suppose that the DataGrid?'s DOM elements are created "lazily", on a "as needed" basis) results in _minutes_ of inactivity with FF3 (in my case, about one and half minute for a Grid tied to an ItemFileWriteStore? containing only 366 rows and 2 columns), whereas it's much faster with MSIE7 (a couple of seconds). This also applies to cases where the setStructure() method is invoked to change an existing structure.
The main responsible appears to be the method dojox.grid._Viewdestroy() in dojox/grid/_View.js, which iteratively calls dojo._destroyElement(). According to Firebug's profiler, calls to the latter account for the bulk of the delay:
Function Calls Percent Own Time Time Avg Min Max
_destroyElement() 380 68.73% 56384.056ms 56388.777ms 48.392ms 0.227ms 239.601ms
Isn't there a faster way to handle bulk destruction of elements, or perhaps refactor the code to create only the inspected DOM elements and destroy them immediately when they scrolled out of the visualized area? It's a shame to see FF underperform MSIE...
Change History (2)
comment:1 Changed 13 years ago by
Milestone: | tbd → 1.2 |
---|---|
Priority: | normal → high |
comment:2 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Please reopen with a test case if you are able to reproduce
I'm not seeing this behavior. Could you please attach a test case so I can get to the bottom of this? Thanks!