TMF: Cache average char width to speed up control flow drawing.
authorFrancois Doray <fdoray.eclipse@gmail.com>
Tue, 10 Mar 2015 15:33:34 +0000 (11:33 -0400)
committerPatrick Tasse <patrick.tasse@gmail.com>
Tue, 10 Mar 2015 16:42:38 +0000 (12:42 -0400)
commitc14ac38f191682dc6a2c64fabd395e9858375154
treea46fca06c823d0a016f0e69ff5c4983cb599dd69
parentda707390dfef76600d405a04a72b3abe53bc9fed
TMF: Cache average char width to speed up control flow drawing.

Before this fix, calls to gc.getFontMetrics() represented more
than 40% of the time required to draw the control flow for some
traces
(http://secretaire.dorsal.polymtl.ca/~fdoray/tracing/screenshots/getFontMetrics.png)

With this fix, the method is called only once. Navigation is
much more fluid for traces that contain a lot of state changes.

This fix should also be applied to other similar presentation
providers.

Change-Id: I5dd7815f9ee52e24d6467250fea4e0859be202f6
Signed-off-by: Francois Doray <fdoray.eclipse@gmail.com>
Reviewed-on: https://git.eclipse.org/r/43182
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
org.eclipse.tracecompass.analysis.os.linux.ui/src/org/eclipse/tracecompass/analysis/os/linux/ui/views/controlflow/ControlFlowPresentationProvider.java
This page took 0.025906 seconds and 5 git commands to generate.