RESOLVED FIXED 235448
file.stream() is slow and CPU-bound
https://bugs.webkit.org/show_bug.cgi?id=235448
Summary file.stream() is slow and CPU-bound
Jacob Bandes-Storch
Reported 2022-01-21 11:05:13 PST
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).
Attachments
Screen recording demonstrating the issue (9.40 MB, video/quicktime)
2022-01-21 11:05 PST, Jacob Bandes-Storch
no flags
Patch (5.14 KB, patch)
2022-01-24 10:25 PST, youenn fablet
no flags
Patch for landing (5.16 KB, patch)
2022-01-24 11:28 PST, youenn fablet
no flags
Radar WebKit Bug Importer
Comment 2 2022-01-24 10:25:46 PST
youenn fablet
Comment 3 2022-01-24 10:25:53 PST
Alex Christensen
Comment 4 2022-01-24 11:22:27 PST
Comment on attachment 449827 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=449827&action=review > Source/WebCore/fileapi/Blob.cpp:273 > return; This is a little strange. There is nothing after this now.
youenn fablet
Comment 5 2022-01-24 11:28:08 PST
Created attachment 449836 [details] Patch for landing
EWS
Comment 6 2022-01-24 13:13:50 PST
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].
Jacob Bandes-Storch
Comment 7 2022-01-24 14:28:58 PST
Amazing turnaround time! :D
Note You need to log in before you can comment on or make changes to this bug.