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

Reduce usage of Date.now() in src/core/worker.js #10608

Merged
merged 2 commits into from
Mar 5, 2019

Conversation

Snuffleupagus
Copy link
Collaborator

Currently for every single parsed/rendered page there's no less than four Date.now() calls being made on the worker-side. This seems totally unnecessary, since the result of these calls are, by default, not used for anything unless the verbosity level is set to INFO.

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Mar 2, 2019

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/ddab2bf6ce1328e/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 2, 2019

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/a84cbdbc79091fb/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Mar 2, 2019

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/ddab2bf6ce1328e/output.txt

Total script time: 18.05 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Mar 2, 2019

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/a84cbdbc79091fb/output.txt

Total script time: 25.46 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

Currently for every single parsed/rendered page there's no less than *four* `Date.now()` calls being made on the worker-side. This seems totally unnecessary, since the result of these calls are, by default, not used for anything *unless* the verbosity level is set to `INFO`.
…ls.js` file

Given that the function is (purposely) independent of the verbosity level and that its message is worded to only apply on the main-thread, there's no reason to duplicate this across the built `pdf.js`/`pdf.worker.js` files.
@timvandermeij timvandermeij merged commit e9661ed into mozilla:master Mar 5, 2019
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the worker-less-Date-usage branch March 6, 2019 00:16
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.

None yet

3 participants