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

Re-factor how parameters are passed to the network streams #9037

Merged
merged 1 commit into from
Nov 18, 2017
Merged

Re-factor how parameters are passed to the network streams #9037

merged 1 commit into from
Nov 18, 2017

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 16, 2017

This patch is the result of me starting to look into moving parameters from PDFJS into getDocument and other API methods.

When familiarizing myself with the code, the signatures of the various network streams seemed to be unnecessarily cumbersome since disableRange is currently handled separately from other parameters.
I'm assuming that the explanation for this is probably "for historical reasons", as is often the case. Hence I'd like to clean this up before we start the larger, and more invasive, PDFJS parameter re-factoring.

Edit: Slightly smaller diff with https://github.com/mozilla/pdf.js/pull/9037/files?w=1.

@Snuffleupagus Snuffleupagus changed the base branch from version-2.0 to master October 31, 2017 21:28
@mozilla mozilla deleted a comment from pdfjsbot Nov 1, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 1, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 1, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 1, 2017
source.disableAutoFetch = getDefaultSetting('disableAutoFetch');
source.disableStream = getDefaultSetting('disableStream');
source.chunkedViewerLoading = !!pdfDataRangeTransport;
Copy link
Collaborator Author

@Snuffleupagus Snuffleupagus Nov 4, 2017

Choose a reason for hiding this comment

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

Removing this line isn't really relevant to the rest of the patch, but since I was touching code nearby it seemed like a nice clean-up given that this property has been unused since PR #8617.

*This patch is the result of me starting to look into moving parameters from `PDFJS` into `getDocument` and other API methods.*

When familiarizing myself with the code, the signatures of the various network streams seemed to be unnecessarily cumbersome since `disableRange` is currently handled separately from other parameters.
I'm assuming that the explanation for this is probably "for historical reasons", as is often the case. Hence I'd like to clean this up *before* we start the larger, and more invasive, `PDFJS` parameter re-factoring.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9abd4e922dd49c1/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/9abd4e922dd49c1/output.txt

Total script time: 2.52 mins

Published

@mozilla mozilla deleted a comment from pdfjsbot Nov 18, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 18, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 18, 2017
@mozilla mozilla deleted a comment from pdfjsbot Nov 18, 2017
@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/0ac481a7a67637a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/94db1a4e86e87cd/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0ac481a7a67637a/output.txt

Total script time: 16.96 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/94db1a4e86e87cd/output.txt

Total script time: 23.90 mins

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

@timvandermeij timvandermeij merged commit edaf4b3 into mozilla:master Nov 18, 2017
@timvandermeij
Copy link
Contributor

Looks better this way, thanks!

@Snuffleupagus Snuffleupagus deleted the refactor-streams-params branch November 18, 2017 16:31
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…arams

Re-factor how parameters are passed to the network streams
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