Bug 188243

Summary: fetch().text() should share memory on the same URL
Product: WebKit Reporter: Saam Barati <saam>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: achristensen, beidson, cdumez, rniwa, saam, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

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
Saam Barati
Comment 1 2018-08-01 18:10:33 PDT
Note You need to log in before you can comment on or make changes to this bug.