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

Don't re-create the structTreeLayer on zooming and rotation #15778

Merged
merged 2 commits into from
Dec 6, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Dec 3, 2022

Compared to the recent PR #15722 for the textLayer this one should be a (comparatively) much a smaller win overall, since most documents don't have any structTree-data and the required parsing should be cheaper. However, it seems to me that it cannot hurt to improve this nonetheless.

Note that by moving the structTreeLayer initialization we remove the need for the "textlayerrendered" event listener, which thus simplifies the code a little bit.

Also, removes the API-caching of the structTree-data since this was basically done to offset the lack of caching in the viewer.

Also change the "private" methods into properly private ones.
@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@mozilla mozilla deleted a comment from pdfjsbot Dec 4, 2022
@mozilla mozilla deleted a comment from pdfjsbot Dec 4, 2022
@mozilla mozilla deleted a comment from pdfjsbot Dec 4, 2022
@mozilla mozilla deleted a comment from pdfjsbot Dec 4, 2022
Compared to the recent PR 15722 for the `textLayer` this one should be a (comparatively) much a smaller win overall, since most documents don't have any structTree-data and the required parsing should be cheaper. However, it seems to me that it cannot hurt to improve this nonetheless.

Note that by moving the `structTreeLayer` initialization we remove the need for the "textlayerrendered" event listener, which thus simplifies the code a little bit.

Also, removes the API-caching of the structTree-data since this was basically done to offset the lack of caching in the viewer.
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/40ee55dbfcd6042/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/5cf7f4c7faebd68/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/40ee55dbfcd6042/output.txt

Total script time: 25.57 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 6
  different first/second rendering: 1

Image differences available at: http://54.241.84.105:8877/40ee55dbfcd6042/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/5cf7f4c7faebd68/output.txt

Total script time: 33.96 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 14

Image differences available at: http://54.193.163.58:8877/5cf7f4c7faebd68/reftest-analyzer.html#web=eq.log

@Snuffleupagus Snuffleupagus marked this pull request as ready for review December 4, 2022 09:56
@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Linux m4)


Received

Command cmd_preview from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/3deb117db922470/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Dec 4, 2022

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/3deb117db922470/output.txt

Total script time: 1.27 mins

Published

Copy link
Contributor

@calixteman calixteman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for simplifying this.

@Snuffleupagus Snuffleupagus merged commit cdd39ec into mozilla:master Dec 6, 2022
@Snuffleupagus Snuffleupagus deleted the keep-structTree branch December 6, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants