-
-
Notifications
You must be signed in to change notification settings - Fork 381
feat: don't read full file if range header is present #1002
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What we need to finish?
Codecov Report
@@ Coverage Diff @@
## master #1002 +/- ##
=======================================
Coverage 97.90% 97.91%
=======================================
Files 10 10
Lines 287 288 +1
Branches 100 102 +2
=======================================
+ Hits 281 282 +1
Misses 6 6
Continue to review full report at Codecov.
|
@alexander-akait Sorry I forgot to remove the WIP notice. The PR is ready to be reviewed with no further changes intended on my side. |
Can you provide link on the original code? |
|
Is there anything left I can do to help this PR progress? |
@JonnyBurger Sorry for delay, still in my TODO, hope I will merge it on this week |
No stress! |
This PR contains a:
Motivation / Use-Case
I am reading in a 2GB file for Remotion. This is a framework for making videos in React, and the end product is not shipped to a website, but written to an MP4 file. Therefore it's not a problem that we import these large files in Webpack.
However, when the browser is loading a video, and we seek forward, then a range header is sent to Webpack Dev Server. Unfortunately it is slow, because WDS is still loading the full file. I adapted the logic from
serve-handler
instead so instead of reading the full 2GB file synchronously, it uses a Read Stream.Breaking Changes
No breaking changes.