Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7258 closed enhancement (fixed)

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.

Change History (3)

comment:2 Changed 12 years ago by Adam Baratz

Resolution: fixed
Status: newclosed

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

Changeset: 51df02ee4ea02e91919842a169463612176682d5

comment:3 Changed 12 years ago by ohlavacek

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)

Note: See TracTickets for help on using tickets.