Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDebug servo build is intermittently unresponsive #22988
Comments
|
Judging by RUST_LOG=script::scipt_thread, it spends a really long time processing a particular network response event. |
|
It appears to be hanging while reflowing after the DOMContentLoaded event, with a layout that is taking a ridiculously long time. |
|
Servo appears to be issuing a reflow after every single DOM node that is parsed. This is terrible! |
|
Ok, there are a bunch of problems conspiring to make this really bad:
Taken together this is what happens - for each link in the list of examples, we create a new document, parse a bit of text into it, finish parsing and fire a DOMContentLoadedEvent at the new document, then synchronously reflow the main page without having made any changes to it. Also the synchronous reflow can't be short-circuited because we insist on dirtying every node in the page. |
|
Possibly related? #22926 This sometimes shows itself in the log as a network hang, but it's actually waiting for window events. |
|
This issue reflects a particular edge case involving lots of uses of innerHTML during initial document load. I wouldn't assume too broad an impact. |
Remove an unnecessary synchronous full reflow. We already reflow any nodes that are dirtied during any turn of the event loop. There is no reason to synchronously reflow the entire document, especially when we don't even modify it in this method. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22988 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22995) <!-- Reviewable:end -->
Remove an unnecessary synchronous full reflow. We already reflow any nodes that are dirtied during any turn of the event loop. There is no reason to synchronously reflow the entire document, especially when we don't even modify it in this method. - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #22988 - [x] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22995) <!-- Reviewable:end -->
When I load https://threejs.org/examples in a debug servo build, often it works as expected. Once in a while it takes a very long time before the hover styles start appearing under the mouse. There is no reported hang from the background hang monitor.