Skip to main content

Search and Top Navigation

#7258 closed enhancement (fixed)

Opened April 15, 2011 03:11PM UTC

Closed May 02, 2011 10:03PM UTC

Last modified July 30, 2011 11:57AM UTC

Dialog: optimize initialization

Reported by: adambaratz Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.dialog Version: 1.8.11
Keywords: Cc:
Blocked by: Blocking:

Assorted changes to speed up loading:

  • _create: Delay appending the container div to the body until the end of the function. Since more manipulations are going to occur between the creation of that div and the end of that function, it's adding work for the browser to append it at an early stage.
  • open: There's currently a chain of concat calls to find the first tabbable element. Since the first query may return a match, it's wasteful to keep looking if there was a match.
  • _createButtons: A couple divs are created, but they're not necessarily used. Check whether there are any buttons before doing the work. Returning any resulting div facilitates "subclassing" this plugin.
Attachments (0)
Change History (3)

Changed May 02, 2011 10:03PM UTC by Adam Baratz comment:2

resolution: → fixed
status: newclosed

Dialog: remove unneeded DOM manipulations. Fixed #7258 - optimize initialization.

Changeset: 51df02ee4ea02e91919842a169463612176682d5

Changed July 30, 2011 11:57AM UTC by ohlavacek comment:3

This stil performs poorly with the latest version (1.8.14) and a new dialog with arount 300 elements (Firefox 5 takes around 5 seconds)