Closed Bug 1390704 Opened 3 years ago Closed 3 years ago

Stylo slows down image/test/crashtests/694165-1.xhtml *very* significantly on debug builds


(Core :: CSS Parsing and Computation, defect)

Not set



Tracking Status
firefox57 --- fixed


(Reporter: glandium, Assigned: glandium)




(1 file)

In the past, it has caused bug 956211 and bug 1202047. When building current mozilla-central with GCC6 on automation, it causes stylo debug builds to fail the test with the same "load failed: null" as bug 956211.

The cause of the failure is that with the current GCC version, the time it takes to run this test is already close to the 5 minutes timeout for reftests, and building with GCC 6 somehow makes debug builds slower enough that we tip over the limit.

Interestingly, I was failing to reproduce the error with the actual try build artifact because on my machine it somehow takes less than 4 minutes to finish, while on automation, after increading the timeout, I observed it finished in only a few seconds more than 5 minutes.
So, it looks like there's something *very* wrong with stylo. Looking at crashtest logs on mozilla-central (so with the current GCC, not GCC 6), this is what can be seen:

Linux64 debug (i.e. stylo disabled):
[task 2017-08-15T22:12:47.137523Z] 22:12:47     INFO - REFTEST TEST-START | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml
[task 2017-08-15T22:12:56.769676Z] 22:12:56     INFO - REFTEST TEST-END | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml

That's 9 seconds.

Linux64 stylo debug:
[task 2017-08-15T22:14:23.551473Z] 22:14:23     INFO - REFTEST TEST-START | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml
[task 2017-08-15T22:18:31.663581Z] 22:18:31     INFO - REFTEST TEST-END | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml

and further down the log:
[task 2017-08-15T22:30:55.103685Z] 22:30:55     INFO - REFTEST INFO | Slowest test took 248085ms (file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml)

That's 4 minutes and 8 seconds, instead of 9 seconds without stylo.
Component: ImageLib → CSS Parsing and Computation
Summary: image/test/crashtests/694165-1.xhtml is too slow → Stylo slows down image/test/crashtests/694165-1.xhtml *very* significantly
Funnily enough, that's not happening on opt builds:

Linux64 opt:
[task 2017-08-15T22:18:56.988976Z] 22:18:56     INFO - REFTEST TEST-START | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml
[task 2017-08-15T22:18:58.581782Z] 22:18:58     INFO - REFTEST TEST-END | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml

Linux64 stylo opt:
[task 2017-08-15T22:19:05.719692Z] 22:19:05     INFO - REFTEST TEST-START | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml
[task 2017-08-15T22:19:07.327684Z] 22:19:07     INFO - REFTEST TEST-END | file:///home/worker/workspace/build/tests/reftest/tests/image/test/crashtests/694165-1.xhtml
Summary: Stylo slows down image/test/crashtests/694165-1.xhtml *very* significantly → Stylo slows down image/test/crashtests/694165-1.xhtml *very* significantly on debug builds
A profile of the first 20 seconds loading the testcase:
So, this is just because we have some debug assertions in stylo that don't interact well with this testcase (Gecko also has quadratic behavior here, but does lazy frame construction differently, and probably doesn't get reconstruct hints here).

I think we should just skip-if((stylo||styloVsGecko)&&isDebugBuild) on this crashtest with a comment explaining why.
Oh, and opt stylo is about 70ms (15%) faster than opt gecko on this testcase:

This difference is basically the difference in styling performance, and the lazy frame construction performance is about the same.
Assignee: nobody → mh+mozilla
Comment on attachment 8897690 [details]
Bug 1390704 - Skip 694165-1.xhtml crashtest on stylo debug.
Attachment #8897690 - Flags: review?(bobbyholley) → review+
Pushed by
Skip 694165-1.xhtml crashtest on stylo debug. r=bholley
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.