Performance-regression for eclipse RAP based applications (reflow caused by setting scrollLeft)
Categories
(Core :: Layout, defect, P2)
Tracking
()
People
(Reporter: linuxhippy, Assigned: emilio)
References
(Regression)
Details
(Keywords: perf, regression)
Attachments
(2 files)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
pascalc
:
approval-mozilla-release+
|
Details | Review |
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
pascalc
:
approval-mozilla-release+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0
Steps to reproduce:
- used an internal application based on the RAP framework
Actual results:
- noticed how navigating to a particular site got so much slower (12s -> 35s) when running an updated firefox site
Expected results:
- firefox should not regress for this case and be as fast as chrome (9s)
Reporter | ||
Comment 1•6 years ago
|
||
some more information:
-
mozregression led me to the following push range: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=d6a02521683879d28e94e2912c09fcec1645d2f3&tochange=32b792a2a7a4c1876a2de67e752881ebcb3e08a3
-
a firefox profile is available here: http://bit.ly/2WlMInL
The issue seems to be caused by setting Element.scrollLeft to some value (the framework does this for each and every element), almost all the time is spent there. -
the code in question is at: https://github.com/eclipse/rap/blob/master/bundles/org.eclipse.rap.rwt/js/rwt/widgets/base/Widget.js
disableScrolling -> _blockScrollingOnAppear
Unfortunately I wasn't successful in creating a standalone reproducing test-case (maybe I need to create more unrelated DOM stuff just to make the reflow more expensive).
Reporter | ||
Comment 2•6 years ago
|
||
I finally succeeded in creating a stand-alone testcase.
A ready-to-run war-file, as well as a fully configured tomcat with the application pre-deployed are available at:
https://drive.google.com/drive/folders/1RANc_MHhuLf6uy4l9m7Nu7eoAFsSC8Ng?usp=sharing
Steps to start the tomcat:
- Un-7-zip
- bin/startup.sh (or the windows equivalent)
Open the URL: http://localhost:8080/bench/bench
a button with "perform slow operation" appears -> click it.
Results:
Chrome: ~6s
Firefox 69 Nightly: 50s
Reporter | ||
Comment 3•6 years ago
|
||
Firefox 65: 3s
so Firefox 65 -> 67 caused an almost 20x slowdown for this particular test.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 4•6 years ago
|
||
Huh, that regression range seems quite surprising... Will take a look though.
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 5•6 years ago
|
||
I'm not sure I'll be able to take a look before Monday because I need to get a plane today, but just wanted to confirm that I can reproduce the regression. Thanks so much for the effort in constructing a test-case.
Assignee | ||
Comment 6•6 years ago
|
||
Looks like a nasty perf regression. I want to understand what's going on since it doesn't quite make sense to me off-hand, patch that allegedly introduced it should be mostly performance-neutral.
Reporter | ||
Comment 7•6 years ago
|
||
Hi Emilio, thanks a lot for looking into this - I was also puzzled, the code in the commits looks rather harmless.
Updated•6 years ago
|
Assignee | ||
Comment 8•6 years ago
|
||
(In reply to Clemens Eisserer from comment #7)
Hi Emilio, thanks a lot for looking into this - I was also puzzled, the code in the commits looks rather harmless.
Ugh, got it, silly me :(
That website heavily relies on one of our reflow optimizations that I accidentally broke. I'll fix and add a test.
Assignee | ||
Comment 9•6 years ago
|
||
Ugh, I accidentally introduced this in bug 1523071. :(
Assignee | ||
Comment 10•6 years ago
|
||
Depends on D33434
Assignee | ||
Comment 11•6 years ago
|
||
That website could be infinitely faster btw (both in Firefox and Chromium), if they avoided the pattern:
element.style.left = something that depends on offsetHeight or other layout-dependent value
Assignee | ||
Comment 12•6 years ago
|
||
Comment on attachment 9069258 [details]
Bug 1555962 - Fix a typo that makes us reflow too much in abspos subtrees. r=jwatt
Beta/Release Uplift Approval Request
- User impact if declined: Sizable perf regression.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: Can use the test in comment 2, or the file added in https://bugzilla.mozilla.org/attachment.cgi?id=9069259.
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Re-introduces an optimization which I broke in some cases.
- String changes made/needed: none
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Tracking for 67 as this fix seems like a potential ride-along for a future dot release.
Comment 15•6 years ago
|
||
Comment 16•6 years ago
|
||
Comment 17•6 years ago
|
||
bugherder |
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Comment 18•6 years ago
|
||
Looks fixed, starting in Mozilla Firefox Nightly 69.0a1 (2019-06-04), so I'm marking this bug as VERIFIED.
Thank you very much! \o/
@ Clemens Eisserer - As reporter, could you confirm this please?
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 19•6 years ago
|
||
just tested against the production code - everything is as fast as before :)
Thanks a lot!
Comment 20•6 years ago
|
||
Comment on attachment 9069258 [details]
Bug 1555962 - Fix a typo that makes us reflow too much in abspos subtrees. r=jwatt
fix a logic error, approved for 68.0b8
Updated•6 years ago
|
Comment 21•6 years ago
|
||
I've reproduced this issue on Fx 69.0a1 - 2019-05-31 (Ubuntu 18.04 x64) and I can confirm also, it is fixed with the latest Nightly 69.0a1 - 2019-06-04. I'm letting the qa+ flag on, in order to verify this issue once the fix will land in Fx 68.0b8.
Comment 22•6 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 23•6 years ago
|
||
(In reply to Clemens Eisserer from comment #19)
just tested against the production code - everything is as fast as before :)
Thanks a lot!
You're welcome, thanks so much for reporting it :)
Comment 24•6 years ago
|
||
I can confirm the issue is fixed on Beta also (68.0b8 - 20190606101422) with Ubuntu 18.04 x64.
Updated•6 years ago
|
Updated•6 years ago
|
Comment 25•6 years ago
|
||
Comment on attachment 9069259 [details]
Bug 1555962 - Add a perf test which is an order of magnitude slower without the previous patch. r=heycam
Fix for a logic error covered by tests and uplift verified in 68b8, approcved for 67.0.2 thanks.
Updated•6 years ago
|
![]() |
||
Comment 26•6 years ago
|
||
bugherder uplift |
Comment 27•6 years ago
|
||
"Platform: x86_64 Linux"
really?
Comment 29•6 years ago
|
||
This issue is verified fixed with 67.0.2 (20190607204818) on Ubuntu 18.04 x64.
Comment 30•6 years ago
|
||
(In reply to j.j. from comment #27)
"Platform: x86_64 Linux"
really?
not really, Platform -> All (this bug is obviously on Windows as well)
Description
•