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

[api-minor] Allows a worker to handle multiple documents. #6571

Merged
merged 3 commits into from
Nov 24, 2015

Conversation

yurydelendik
Copy link
Contributor

Added features:

  • Allows create a PDFWorker object prior getDocument use
  • Every loading task has unique docId, that allows generate unique fonts and use several PDF documents inside single worker
  • FontLoader refactored to not be global

@yurydelendik
Copy link
Contributor Author

Fixes #5992
Alternative solution for #5984
Shall address #6209, #6205, #5148, #4228

this._worker = null;

/**
* Unique document loading task id -- used in MessageHanlders.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: typo MessageHandlers

@yurydelendik
Copy link
Contributor Author

Some unit tests added to test PDFWorker functionality.

/botio test

@Snuffleupagus
Copy link
Collaborator

I've gone through (and manually tested) this PR, and it all looks good to me!

@brendandahl Would you mind looking through this as well?

* MessageHandler is known.
* @private
*/
function _fetchDocument(worker, source, pdfDataRangeTransport, docId) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: the worker parameter is missing in the JSDoc comments above.

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/af51956bde57538/output.txt

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/68d9e8a784563b7/output.txt

@yurydelendik
Copy link
Contributor Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/2ec1e7b8a44c8e0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/d8f33d17ecf2603/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/2ec1e7b8a44c8e0/output.txt

Total script time: 18.39 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/d8f33d17ecf2603/output.txt

Total script time: 19.83 mins

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

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 1

Live output at: http://107.21.233.14:8877/9c48288dbcad83c/output.txt

timvandermeij added a commit that referenced this pull request Nov 24, 2015
[api-minor] Allows a worker to handle multiple documents.
@timvandermeij timvandermeij merged commit c2dfe9e into mozilla:master Nov 24, 2015
@timvandermeij
Copy link
Contributor

Nice work!

@Snuffleupagus Snuffleupagus mentioned this pull request May 31, 2017
Closed
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.

6 participants