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

Poor performance on a pdf document #4626

Closed
Lex-2008 opened this issue Apr 15, 2014 · 5 comments
Closed

Poor performance on a pdf document #4626

Lex-2008 opened this issue Apr 15, 2014 · 5 comments

Comments

@Lex-2008
Copy link

This PDF document:
http://lex-2008.github.io/pdf.js/print.pdf
has poor performance when scrolling.

as @chriskr noticed, this is probably related to text layer. Setting

.textLayer {display: none;}

increases performance.

To reproduce the issue:

  1. Open attached document
  2. Scroll it to the bottom
    Pass if scrolling performance is acceptable.

The file in question is a pdf printout of a http://habrahabr.ru/post/160035/ page, sent to me by a friend. Not sure how it was generated.

@Snuffleupagus
Copy link
Collaborator

@Lex-2008 For your information, appending textLayer=off to the URL is an even easier way to disable the textLayer completely, see: https://github.com/mozilla/pdf.js/wiki/Debugging-pdf.js#url-parameters.

@timvandermeij
Copy link
Contributor

Scrolling is acceptable to good for this PDF now. Closing as resolved by #5586 and #5595.

@yurydelendik
Copy link
Contributor

#6590 landed but it did not take in account that set text matrix operation can be used for individual glyphs. I think we can do better by applying the same logic as we used for translate operation in #6590.

P.S. delta calculated to make optimization work, four first components of transform matrix must be equal to previous value.

@nikhilshagri
Copy link

I would like to work on this bug. Can you give me some guidance/pointers for fixing this?

@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented May 14, 2016

#6590 landed but it did not take in account that set text matrix operation can be used for individual glyphs. I think we can do better by applying the same logic as we used for translate operation in #6590.

@yurydelendik Is this approximately what you had in mind: master...Snuffleupagus:combine-setTextMatrix? If so, I'll add a test-case and submit a PR.

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

5 participants