philc / philc/vimium

Firefox: Link hints slow (and maybe broken?)

Open
#2,489 4 comments 0 reactions 0 assignees View on GitHub

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.

  1. Go to this page.
  2. Scroll down until just one or two links become visible at the bottom of the page.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.