Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2926 closed defect (fixed)

AccordionContainer layout is brutally slow

Reported by: alex Owned by: Adam Peller
Priority: high Milestone: 0.9beta
Component: Dijit Version: 0.9
Keywords: Cc: alex, koranteng, bill
Blocked By: Blocking:

Description

the layout operations in the AccordionContainer? test page (mostly from base/Layout.js) are so slow as to be unusable. They need to stop calling resize() so often, cache node computed styles for reuse, and use the "_" versions of the style functions in html.js (recently bed-lumped).

Change History (15)

comment:1 Changed 12 years ago by alex

also, the test page has janky HTML, broken CSS paths, and isn't idiomatic.

comment:2 Changed 12 years ago by alex

(In [8430]) make the AccordionPane? test page more grokable. Refs #2926

comment:3 Changed 12 years ago by alex

(In [8459]) fix for IE exceptions. Refs #2926

comment:4 Changed 12 years ago by bill

Component: GeneralWidgets
Milestone: 0.9M20.9beta
Version: 0.4.20.9

It's doing the layout in O(n2) because it calls addChild() once for each pane, which causes all the existing panes to resize.

comment:5 Changed 12 years ago by alex

there seems to be a flurry of events being thrown on FF that cause resize *sometimes*. On Opera, Safari, and IE there layout seems to stabilize faster and therefore the performance is acceptable. Reproducing on FF is spotty and I don't have a technique for reproducing, but when FF gets into a bad state, page rendering can take 30 seconds or more for 2 accordion containers (6 panes total).

comment:6 Changed 12 years ago by Adam Peller

Component: WidgetsDijit

comment:7 Changed 12 years ago by Adam Peller

Owner: changed from koranteng to Adam Peller

comment:8 Changed 12 years ago by Adam Peller

Cc: Adam Peller removed
Status: newassigned

comment:9 Changed 12 years ago by Adam Peller

(In [9158]) Reworked AccordionContainer? to subclass PageContainer? and make more use of HTML flow layout. Still needs xp work and initial pane doesn't always stay up. Refs #2926, #2643

comment:10 Changed 12 years ago by Adam Peller

(In [9164]) Update themeTester to use new Accordion schema with AccordionPane?. Refs #2926, #2643

comment:11 Changed 12 years ago by bill

(In [9172]) Add back dojo.require("dijit.util.manager"). This shouldn't have been removed. Refs #2926, #2643

comment:12 Changed 12 years ago by Adam Peller

(In [9181]) Fixup some regressions in Accordion/PageContainer?. Refs #2926, #2643

comment:13 Changed 12 years ago by Adam Peller

(In [9194]) Fix initial Accordion layout, allow for empty PageContainers?. Refs #2926, #2643

comment:14 Changed 12 years ago by Adam Peller

Resolution: fixed
Status: assignedclosed

(In [9210]) put guards around layout code in add/removeChild. Methods should now work before and after widget has been rendered. add children prior to startup for better performance. layout after startup is better than the old O(n2) due to improved layout. Fixes #2926

comment:15 Changed 12 years ago by Adam Peller

(In [9222]) Incorporate some suggestions from Bill to shorten Accordion code. Refs #2926

Note: See TracTickets for help on using tickets.