Firefox: Link hints slow (and maybe broken?)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 27k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
It looks like the approach we use for finding clickable elements in Chrome might be too slow in Firefox.
- Go to this page.
- Scroll down until just one or two links become visible at the bottom of the page.
- Hit
f.
Observe that this is "fast" with Chrome, but really quite slow with Firefox.
The problem seems to be the loop here where we iterate over every element.
The significance of the test is that it's a big, single-framed page with very few clickable things visible; so the cost must be coming from the indicated loop (I think).
Separately, I think I got into a situation in which, after scrolling quite some way down, link hints failed to open at all. However, I haven't reproduced that case.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the loop around content_scripts/link_hints.coffee line 750 and reproduce the issue on the linked libX11 page in Firefox and Chrome. Compare the cost of pressing f when only one or two links are visible, and investigate whether link hints can also fail after scrolling. Done means the Firefox slowdown or failure is addressed and the reproduction steps no longer show the problem.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100