Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU due to text layer generating one div per letter #1045

Closed
kyteague opened this issue Jan 9, 2012 · 11 comments
Closed

100% CPU due to text layer generating one div per letter #1045

kyteague opened this issue Jan 9, 2012 · 11 comments

Comments

@kyteague
Copy link

kyteague commented Jan 9, 2012

Here is the PDF
http://www.music.mcgill.ca/~cmckay/papers/musictech/ISMIR_2006_Genre.pdf

Browser is Chrome 16
OS is Ubuntu 10.10

@arturadib
Copy link
Contributor

This doc was my worst nightmare when writing the text selection algo :) We're planning to revisit it soon.

@jviereck
Copy link
Contributor

The link is broken, but one other file

http://www.music.mcgill.ca/~cmckay/papers/musictech/ISMIR_2006_Codaich.pdf

shares the same issue.

@Wizek
Copy link

Wizek commented Jun 6, 2012

@arturadib Have you done any revisits yet? If so, how was it? If not, how do you plan to revisit?

@arturadib
Copy link
Contributor

@Wizek We are experimenting with a new text selection backend to handle this type of document - see #1205. Some challenges have not been overcome yet though (see description of that pull request).

@Wizek
Copy link

Wizek commented Jun 6, 2012

@arturadib Thanks!

@kkujala
Copy link
Contributor

kkujala commented Mar 13, 2013

Rendering for me is fast and text delection works. FF 21.0a2 (2013-03-13) Win7 hwa=on. Closed as fixed?

@brendandahl
Copy link
Contributor

Still is incredibly slow scrolling for me.

@timvandermeij
Copy link
Contributor

Confirmed, scrolling is very slow on Firefox 20 with HWA enabled, Windows 7 64-bit and pdf.js development version.

@timvandermeij
Copy link
Contributor

Another example: http://iacoma.cs.uiuc.edu/iacoma-papers/pldi14.pdf (from #4988).

@nnethercote
Copy link
Contributor

https://bugzilla.mozilla.org/show_bug.cgi?id=1054161 will help this quite a bit in Firefox.

nnethercote added a commit to nnethercote/pdf.js that referenced this issue Aug 20, 2014
This change makes the transform-origin style be applied via viewer.css,
rather than annotating every node individually. It makes the scrolling
of the document from mozilla#1045 substantially smoother in Firefox.
@nnethercote
Copy link
Contributor

#5209 helps here.

nnethercote added a commit to nnethercote/pdf.js that referenced this issue Aug 21, 2014
This change makes scrolling noticeably smoother on files with many
single-char text divs, such as the one in mozilla#1045. The trade-off is that
the visual appearance of text selection in such documents is slightly
worse, because more text divs overlap.

This change also uses `scaleX(N)` instead of `scale(N, 1)`. This might
be marginally more efficient in terms of JS string concatenation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants