Created attachment 449672 [details]
Screen recording demonstrating the issue
Also filed as FB9854642
Reading a file with file.stream() is much slower than repeatedly calling file.slice().
1. Visit https://jsfiddle.net/0hnembvu/21/
2. Choose a large file (~200MB). Observe the progress bar updates smoothly, and the file can be read in ~200ms.
3. Reload the page.
4. Enable the "use ReadableStream API" checkbox.
5. Choose the same large file again. Observe the page becomes unresponsive while reading (the progress bar does not update smoothly) and the file takes much longer to read (~1500ms).
Real world example: https://github.com/foxglove/studio/pull/2711/commits/a1ebf5f13b20348832314d19bab1a522e5b35b8a#diff-b179de6d22a74da74418686ff2da061144a5cd7d814facb743da2b755e17598aR272
Created attachment 449827 [details]
Comment on attachment 449827 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=449827&action=review
This is a little strange. There is nothing after this now.
Created attachment 449836 [details]
Patch for landing
Committed r288463 (246349@main): <https://commits.webkit.org/246349@main>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 449836 [details].
Amazing turnaround time! :D