Files
gerrit/gerrit-gwtui
Shawn Pearce c962cc0bd6 SideBySide2: Batch adjustments of padding widgets
Right after the view opens a number of deferred tasks fire, one for
each padding region and comment widget to rescale the padding size.
Every time these update a CM3 controlled property the CM3 instance
has to reflow its DOM, which is relatively expensive in the browser.

Batch the deferred work inside of the SideBySide2 instance as a list
of Runnables.  If any tasks are scheduled, schedule only one deferred
task to run all batched items inside of an operation() wrapper. This
allows CM3 to batch up the updates and reflow its DOM only once per
side, rather than once per padding widget.

In one example file (some version of ChangeScreen2.java) with a
handful of diff chunks and test comments this batching process saves
40.9 ms during the initial display of the file.

The exact amount of time saved depends on the complexity of the file,
the delta chunks and the number of comments, but this was a fairly
typical trivial example.  Real world files may see an even larger
savings.

Change-Id: Ib84c67d2f999fb7df5731ca3389a79b53da45a01
2013-11-24 17:29:34 -05:00
..
2013-07-30 17:18:33 +00:00