WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
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
Details
Patch
(5.14 KB, patch)
2022-01-24 10:25 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(5.16 KB, patch)
2022-01-24 11:28 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Jacob Bandes-Storch
Comment 1
2022-01-21 11:37:52 PST
Real world example:
https://github.com/foxglove/studio/pull/2711/commits/a1ebf5f13b20348832314d19bab1a522e5b35b8a#diff-b179de6d22a74da74418686ff2da061144a5cd7d814facb743da2b755e17598aR272
Radar WebKit Bug Importer
Comment 2
2022-01-24 10:25:46 PST
<
rdar://problem/87977499
>
youenn fablet
Comment 3
2022-01-24 10:25:53 PST
Created
attachment 449827
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug