[Webkit-unassigned] [Bug 188243] New: fetch().text() should share memory on the same URL
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 1 17:20:14 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=188243
Bug ID: 188243
Summary: fetch().text() should share memory on the same URL
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Page Loading
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sbarati at apple.com
CC: achristensen at apple.com, beidson at apple.com,
cdumez at apple.com, rniwa at webkit.org, sbarati at apple.com,
webkit-bug-importer at group.apple.com, youennf at gmail.com
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.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180802/5fc6d2d0/attachment.html>
More information about the webkit-unassigned
mailing list