[OpenLayers-Trac] Re: [OpenLayers] #2247: getMousePosition off due
to borders and relative/absolute positioning
OpenLayers
trac-20090302 at openlayers.org
Fri Nov 5 08:30:33 EDT 2010
#2247: getMousePosition off due to borders and relative/absolute positioning
-----------------------------------------------------------------------------------------------+
Reporter: chrelad@… | Owner: euzuro
Type: bug | Status: new
Priority: critical | Milestone: 2.11 Release
Component: Events | Version: 2.8
Keywords: mouse position getMousePosition offset click coordinates border relative position | State: Commit
-----------------------------------------------------------------------------------------------+
Changes (by erilem):
* state: Review => Commit
Comment:
Ok, here are the actual profile results in FF3:
{{{
With patch
----------
getMousePosition 1646 calls, 9.16%, 154ms own time, 215ms time, 0.131ms
avg
pagePosition 24 calls, 0.16%, 2.7ms own time, 2.9ms time, 0.124ms avg
getViewportElement 48 calls, 0.04%, 0.59ms own time, 0.59ms time, 0.012ms
avg
Without patch
-------------
getMousePosition 1336 calls, 9.38%, 147ms own time, 175ms time, 0.132ms
avg
pagePosition 21 calls, 0.35%, 5.52ms own time, 11.54ms time, 0.55ms avg
}}}
So the patch doesn't have a negative impact on performance, it even has a
slight positive impact!
Yet, lots of time is spent in {{{getMousePosition}}} (w/ and w/o the
patch), and it would be great to optimize that, I'm not sure it's possible
though.
Thanks for the patch Andreas, it all looks good to me, please commit.
--
Ticket URL: <http://trac.openlayers.org/ticket/2247#comment:11>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list