Replace keyup handling of history metadata typing metrics with C++ implementation
Categories
(Firefox :: Bookmarks & History, enhancement, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox91 | --- | fixed |
People
(Reporter: acreskey, Assigned: acreskey)
References
Details
Attachments
(3 files)
In Bug 1713385 we added the collection of typing metrics to history metadata (i.e. how much time was spent typing).
Disabled behind a pref.
However we took some measurements and found that the "keyup" handler, bound in JavaScript in the parent process, was introducing a measurable performance hit compared to a C++ implementation.
These are results are from a simple typing test. Baseline
refers to running without history metadata enabled.
Time (ms) from PreHandleEvent to PostHandleEvent. Parent process. Reference Laptop, 2017, PGO build
Baseline JS CPP
Mean 0.10073 0.22207 0.08720
Median 0.09050 0.18040 0.08375
Roughly 0.1 ms, with some slow outliers visible when plotted.
Measurements were taken on other devices that reproduced similar effects.
We did try minimizing the JS key handler function, but even an empty JS function introduced a measurable performance drop (~30%) in event handling.
This bug is to update the implementation of Bug 1713385 to replace the JS implementation of typing metrics with a C++ one.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Due to measured performance issues in the Chrome process, moving this code to C++.
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Measured on a Macbook pro, PGO build, the C++ implementation from the attached patch is within the noise, performance wise, of having interactions disabled.
Pushed by acreskey@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5bbffb65c5e2 Replace keyup handling of history metadata typing metrics with C++ implementation r=Standard8,smaug
Comment 4•3 years ago
|
||
bugherder |
Description
•