Opened 12 years ago

Closed 11 years ago

#3092 closed enhancement (fixed)

tune widget system performance

Reported by: alex Owned by: bill
Priority: high Milestone: 1.1
Component: Dijit Version: 0.9
Keywords: Cc: alex
Blocked By: Blocking:

Description

the widget system in 0.9 is pretty quick, but we should keep an eye on the ball. This is a general bug for widget tuning purposes. Checkins logged here should note the performance differences that go along w/ each change.

Change History (6)

comment:1 Changed 12 years ago by alex

(In [8685]) updates to improve the performance of _createNodesFromText. This checkins:

  • replaces the cloning logic w/ direct node removal
  • reuses the encapsulating node
  • moves regular expression calculations out of the fast path and moves string trimming to the caching logic (verified that it's not called outside of this code path)
  • hoists at least one invariant out of a loop (and this is regexp replacement, so it matters)
  • moves "appendChild" logic for putting nodes in the rendered DOM to after the replacement of the innerHTML of the container

On the "themeTest.html" page, these changes reduced the time to construct the ~90 widgets on that page by nearly 20ms (112ms->93ms, avg).

Refs #3092

comment:2 Changed 12 years ago by alex

(In [8686]) move the regexes out of the fast path so that there's less chance they'll be recompiled. Drops heavy dojo._Url usage speed by ~20%. Refs #3092

comment:3 Changed 12 years ago by alex

(In [8688]) profiling page cleanup to enable better testing. Refs #3092

comment:4 Changed 12 years ago by bill

Milestone: 0.91.1

comment:5 Changed 12 years ago by Adam Peller

(In [9866]) Move source uri hint to end of file (for firebug 1.1) so that it won't throw off the line count in the eval buffer by 1. Refs #3092

comment:6 Changed 11 years ago by bill

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.