Navigating to specific markdown files on github is extremely slow
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox122 | --- | fixed |
People
(Reporter: mstange, Assigned: emilio)
Details
Attachments
(1 file)
Steps to reproduce:
- Go to https://github.com/jrmuizel/github-slow-md
- Click on
go-slow.md
Expected results:
The contents of the markdown file should appear quickly. (They do in Chrome.)
Actual results:
It takes thirty seconds or more.
Profile: https://share.firefox.dev/3SPoNsN
Comment 1•2 years ago
|
||
To add to that: It gets massively worse if you select one of the JS code boxes and try to view the source for the selection. That took several minutes on my machine (on a M1 Mac; loading the md file itself only took ~5s instead of the reported 30s).
I have created a few-second-snapshot profile. That profile shows significant time is spent in this comparator, which calls nsINode::ComparePoints_deprecated(), all triggered from nsIFrame::IsFrameSelected() while reflowing.
It looks from the profile as if nsIFrame::IsFrameSelected() is called twice during reflow. Maybe it's possible to add some caching there (that feels like fighting the symptoms though, and also won't fix the original issue)?
:smaug, wdyt?
| Assignee | ||
Comment 2•2 years ago
|
||
If the element already has the right directionality we don't need to
traverse the whole subtree.
Clean-up surrounding code a little bit while at it.
Updated•2 years ago
|
| Assignee | ||
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
oh, the needinfo was for another issue. Jan, please file another bug for that.
Comment 6•2 years ago
|
||
| bugherder | ||
Description
•