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

Simplify the newRefs computation in the "SaveDocument"-handler in the worker-thread #15062

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Jun 19, 2022

  • Let the Page.save-method filter out "empty" entries, similar to the Page._parsedAnnotations-getter, since that on its own already simplifies the "SaveDocument"-handler a tiny bit.

  • The existing reduce and concat construction isn't exactly a wonder of readability :-)
    Thanks to modern JavaScript features it should be possible to replace all of this with Array.prototype.flat() instead, which at least to me feels a lot easier to understand.

@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
…he worker-thread

 - Let the `Page.save`-method filter out "empty" entries, similar to the `Page._parsedAnnotations`-getter, since that on its own already simplifies the "SaveDocument"-handler a tiny bit.

 - The existing `reduce` and `concat` construction isn't exactly a wonder of readability :-)
   Thanks to modern JavaScript features it should be possible to replace all of this with `Array.prototype.flat()` instead, which at least to me feels a lot easier to understand.
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@mozilla mozilla deleted a comment from pdfjsbot Jun 19, 2022
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/67c7a2527858c82/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/902be9136a16e58/output.txt

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.241.84.105:8877/b1d9c09925208e0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_integrationtest from @Snuffleupagus received. Current queue size: 1

Live output at: http://54.193.163.58:8877/49cc67eb3d51d3e/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/902be9136a16e58/output.txt

Total script time: 3.27 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/67c7a2527858c82/output.txt

Total script time: 6.11 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/b1d9c09925208e0/output.txt

Total script time: 4.70 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/49cc67eb3d51d3e/output.txt

Total script time: 7.55 mins

  • Integration Tests: Passed

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.

LGTM. Thank you.

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