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 close the connection during range requests. #4739

Closed
yurydelendik opened this issue May 5, 2014 · 3 comments
Closed

Don't close the connection during range requests. #4739

yurydelendik opened this issue May 5, 2014 · 3 comments

Comments

@yurydelendik
Copy link
Contributor

Instead of auto-fetch mode we need to use already opened (initial) connection, in addition to range requests. That might speed up the loading PDF from the sites where range requests are slow. Firefox supports "moz-chunked-arraybuffer" responseType, so we start using data before it's completely loaded. There is also http://www.w3.org/TR/streams-api/#XMLHttpRequest

Pros:

  • Less overhead on range requests, hence faster loading;
  • Early access for the linearized data even if range requests are not available.

Cons:

  • Two connections are opened: range request and initial one;
  • We will fetch the same data chunks twice e.g. PDF tail (first time with range, second when entire data is received).
@yurydelendik
Copy link
Contributor Author

Might help with #4791

@yurydelendik
Copy link
Contributor Author

Fixed by #5263

@yurydelendik
Copy link
Contributor Author

Follow up PR at #5319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant