Opened 11 years ago

Closed 11 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 11 years ago by Bryan Forbes

Milestone: tbd1.2
Priority: normalhigh

I'm not seeing this behavior. Could you please attach a test case so I can get to the bottom of this? Thanks!

comment:2 Changed 11 years ago by Nathan Toone

Resolution: worksforme
Status: newclosed

Please reopen with a test case if you are able to reproduce

Note: See TracTickets for help on using tickets.