[OpenLayers-Trac] Re: [OpenLayers] #2880: handleBrowserEvent: don't
compute mouseposition if it's not needed
OpenLayers
trac-20090302 at openlayers.org
Fri Nov 5 09:32:15 EDT 2010
#2880: handleBrowserEvent: don't compute mouseposition if it's not needed
---------------------+------------------------------------------------------
Reporter: fredj | Owner: tschaub
Type: feature | Status: new
Priority: minor | Milestone: 2.11 Release
Component: Events | Version:
Keywords: | State: Commit
---------------------+------------------------------------------------------
Changes (by erilem):
* state: => Commit
Comment:
[attachment:2880.1.patch]
See the following FireBug profile results. Experiments involve panning the
map using {{{tilecache.html}}} in full page.
{{{
Without patch
--------------
positionImage() 156 16.38%
toFloat() 12612 12.75%
triggerEvent() 3164 6.35%
centerLayerContainer() 211 5.58%
initialize() 2590 4.29%
handleBrowserEvent() 2234 3.54%
getMousePosition() 1120 3.11%
With patch
----------
positionImage() 150 16.61%
toFloat() 12406 12.46%
triggerEvent() 1874 5.67%
centerLayerContainer() 197 5.38%
initialize() 2532 4.58%
getMousePosition() 988 3.52%
}}}
With the patch, {{{triggerEvent}}} and {{{getMousePosition}}} are
significantly less called.
Except {{{Request.html}}} (#2913) and {{{Popup.html}}} (#2919), all tests
pass in FF3. The failing tests are unrelated to this patch, they fail even
when this patch isn't applied.
fredj, please commit if you agree with [attachment:2880.1.patch].
--
Ticket URL: <http://trac.openlayers.org/ticket/2880#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list