STR: 1. Go to https://dxr.mozilla.org/mozilla-central/source/layout/generic/nsFrame.cpp#169 2. Click on any word, e.g. on the word "props" at the beginning of the InitBoxMetrics function. The page freezes for over two seconds until the menu pops up. As a point of comparison, searchfox highlights on hover without impacting performance at all.
IIRC, there's an inefficient iteration in there. We should switch to something more efficient.
Actually the freeze happens because our highlighting causes a re-layout (or two, when something is already highlighted), since adding <mark /> wrapper changes the DOM structure. I'll take this bug, and expect to put up a patch pretty soon.
Here we go, https://github.com/mozilla/dxr/pull/559
Commit pushed to master at https://github.com/mozilla/dxr https://github.com/mozilla/dxr/commit/275f7a2cb5840c67cc4b2a9aa66411c7d156acd4 Avoid reflow on click by unwrapping and removing padding (#559) Fixes bug 1279001 (probably)
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.