WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
188243
fetch().text() should share memory on the same URL
https://bugs.webkit.org/show_bug.cgi?id=188243
Summary
fetch().text() should share memory on the same URL
Saam Barati
Reported
2018-08-01 17:20:14 PDT
For example, we end up with N*file size memory use here: ``` let files = []; for (let i = 0; i < 100; ++i) files.push("foo.js"); async function load(url) { let fetchResponse = await fetch(new Request(url)); let text = await fetchResponse.text(); return text; } async function loadEverything() { let text = []; for (let url of files) text.push(await load(url)); return text; } ``` This is especially bad when "foo.js" is a large file.
Attachments
Add attachment
proposed patch, testcase, etc.
Saam Barati
Comment 1
2018-08-01 18:10:33 PDT
<
rdar://problem/42836736
>
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