Closed
Bug 834997
Opened 12 years ago
Closed 12 years ago
elementFromPoint() (?) showing up in profiles of homescreen
Categories
(Firefox OS Graveyard :: Gaia::Homescreen, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 831656
People
(Reporter: cjones, Unassigned)
Details
Behavior seen in profile
- touchmove dispatched
- mouse_event_shim handleTouchMove() called
- C++ hit-testing frames on stack (elementFromPoint() impl)
- mousemove emitted
- homescreen handleEvent() invoked
The C++ code that looks like elementFromPoint() is taking ~10ms on a critical path.
Comment 1•12 years ago
|
||
We were worried about elementFromPoint() calls when we created this shim. The shim can be set to not call elementFromPoint() for apps that do not need it. We can investigate whether the homescreen can use that.
Basically, if the event management code is okay with mouse events behaving like touch events and always being delivered to the original element (or if the app uses setCapture()) then the shim doesn't need to call elementFromPoint() to simulate mouse event behavior where the event target is always the element under the pointer.
So this is probably optimizable. (And I think early on in the development of this shim, I successfully tested homescreen panning without the elementFromPoint()
calls.)
Vivien probably knows more about the homescreen than I do, but feel free to assign this to me if you want.
Are there perf keywords or whiteboards things to be set for bugs like this?
Reporter | ||
Comment 2•12 years ago
|
||
ISTR that we had to force-off the elementFromPoint() logic because it was too high of an overhead on homescreen, which is why seeing this in the profile surprised me.
I think some folks are using [FFOS-perf] but I'm not sure for what overall purpose.
Comment 3•12 years ago
|
||
Sorry If I haven't understand this bug but currently (in master) the homescreen is working with touch events without shim lib. There aren't elementFromPoint calls in panning code.
Comment 4•12 years ago
|
||
upps sorry for my English: I haven't understood
Reporter | ||
Comment 5•12 years ago
|
||
The profile was made against gecko-18 / nightly.
Comment 6•12 years ago
|
||
Cristian is right: the homescreen doesn't use the mouse shim anymore, at least not in the master or the v1.0.0 branch. So there must be something else going on here.
Comment 7•12 years ago
|
||
It looks like the nightly branch is no longer maintained. The shim was removed the same day this bug was reported. Its still there in nightly, but gone from master and v1.0.0:
The problem went away with this commit which removes the shim:
https://github.com/mozilla-b2g/gaia/commit/7a505331d9fbdd277e5d1c59a9f230200d494c93#apps/homescreen/index.html
And here it is for the 1.0.0 branch:
https://github.com/mozilla-b2g/gaia/commit/8d7803635ced3f4507ed82d0a72a3cc12f5d1585#apps/homescreen/index.html
Resolving this as a dupe of the bug that removed the shim
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•