Open Bug 695298 Opened 13 years ago Updated 2 years ago

Github: line selection becomes very slow as line count increases

Categories

(Firefox :: General, defect)

10 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: xatnys, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0a1) Gecko/20111013 Firefox/10.0a1
Build ID: 20111013103246

Steps to reproduce:

I looked at various documents in Mozilla Labs's own pdf.js github repo of varying length using Nightly on a fresh profile. The easiest testable opposing examples are the following:

Short document, very few lines: https://github.com/andreasgal/pdf.js/blob/master/LICENSE
Medium, ~600 lines: https://github.com/andreasgal/pdf.js/blob/master/crypto.js
Large, ~3000 lines: https://github.com/andreasgal/pdf.js/blob/master/metrics.js
Very large, ~7000 lines: https://github.com/andreasgal/pdf.js/blob/master/cidmaps.js



Actual results:

When clicking the line number (on github, this highlights the selected line) the time it takes to select the line increases drastically as the amount of lines increases. In fact, even just hovering over a line number can cause the entire browser (not just the current tab) to stall.

This is taken to an extreme with the largest example (~7000 lines) causing the browser to become unresponsive for several seconds.


Expected results:

At the very least, line selection should remain responsive regardless of the document size. Even if the line selection itself becomes slower, it should not cause the entire browser to stall (clearly evident in the largest example of 7000 lines). This is the case at least on Chrome, which becomes noticeably slower on the largest example but still remains responsive.
I can confirm this bug, on large documents like
https://github.com/andreasgal/pdf.js/blob/master/src/cidmaps.js
FF becomes unresponsive and takes minutes to load, same when you try to scroll.
Even asks to stop a script.

Beside that the line numbers don't show where they are supposed to be they are way off the actual line.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.