Significant key input delay when typing on large Google Docs
Categories
(Core :: JavaScript Engine, defect, P3)
Tracking
()
Performance Impact | medium |
Tracking | Status | |
---|---|---|
firefox64 | --- | fix-optional |
firefox65 | --- | fix-optional |
People
(Reporter: Dominik, Unassigned)
References
(Depends on 4 open bugs, Blocks 1 open bug)
Details
Attachments
(2 files)
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Comment 3•6 years ago
|
||
Updated•6 years ago
|
Comment 4•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Comment 7•6 years ago
|
||
Updated•6 years ago
|
Comment 8•6 years ago
|
||
Updated•6 years ago
|
Comment 9•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Comment 11•6 years ago
|
||
Comment 12•6 years ago
|
||
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Updated•6 years ago
|
Comment 17•6 years ago
|
||
Comment 18•6 years ago
|
||
Comment 19•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Comment 20•6 years ago
•
|
||
Using these steps:
- enable profiler
- click the link in comment 14
- click in the table on the first page
- type for 20 seconds or so
- capture profile
- in perf.html, click on the "Web Content" process (only one has significant activity during the profile).
On my machine, we're idle 32% of the time; and 27% of total time is spent under js::jit::IonGetPropertyIC::update (doing actual property lookups), and more than half of that (18% of the total) is on a single stack. This made me wonder if it might be actionable as a JS JIT bug, but:
<djvj> jorendorff: P3. Not pageload, and it only shows up on huge docs. Also, doing further perf improvements on it probably requires a rethink of how we structure objects and sparse arrays.
Leaving P1 for now because it's hard to buy that this is really P3, even if the JS engine side of things is too hard to tackle. There's still the 32% idle time.
Comment 21•6 years ago
|
||
Jason - one thing to look at is how many of the new IC updates are happening due to post-GC re-generation of ICs.
Updated•6 years ago
|
Comment 23•5 years ago
|
||
@mkaply, maybe this is something that should block one of the enterprise-tracking bugs, since it seems like it could be a deal-breaker for some enterprises?
Comment 24•5 years ago
|
||
Good call. I'm surprised this is still something we haven't fixed.
Comment 25•5 years ago
|
||
Updated profile (taken with eventDelay data):
https://perfht.ml/2NIS8D5
Comment 26•5 years ago
|
||
Comment 27•5 years ago
|
||
Comment 28•5 years ago
|
||
reload of the page: https://perfht.ml/36Zwims
Mass-removing myself from cc; search for 12b9dfe4-ece3-40dc-8d23-60e179f64ac1 or any reasonable part thereof, to mass-delete these notifications (and sorry!)
Comment 30•4 years ago
|
||
This may be a bit better now with Warp. GDocs had a lot of IonBuilder time on the main thread and Warp should have less of that + it runs off-thread.
Comment 31•4 years ago
|
||
Just to provide a data point about how chrome is better than us.
Firefox: https://share.firefox.dev/2T5BrH7
Chrome: https://share.firefox.dev/3vagyIR
Input event handlers on this gDoc will execute an a
function, it generally took about 80 - 110ms in Firefox, and about 30 - 70ms in Chrome.
Comment 32•4 years ago
|
||
This profile is all property lookup. We're spending 20%+ of our time in NativeGetProperty and NativeGetPropertyNoGC. It will be interesting to see if these numbers change once Jan's reshape work lands.
Comment 33•3 years ago
|
||
Worthwhile to reprofile again now that bug 1704430 has been resolved fixed?
Comment 34•3 years ago
|
||
It's still pretty bad. https://share.firefox.dev/3t3d3WI
In Firefox, each key event handler takes around 35ms on my fast machine. In Chrome, each key event only takes 16ms.
Comment 35•3 years ago
|
||
Now we're spending 10-15% of our time in NativeGetProperty and NativeGetPropertyNoGC, and a similar amount of time in PropMapTable::lookupRaw. The total percentage of time spent looking up properties seems comparable to before, to the extent that it's possible to compare two profiles taken months apart on different machines.
Jan's work on Watchtower might help?
Updated•3 years ago
|
Updated•2 years ago
|
Updated•5 months ago
|
Description
•