Bug 196764
Summary: | Date.setDate is too slow in WKWebView | ||
---|---|---|---|
Product: | WebKit | Reporter: | chenfeng <348018533> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | fpizlo, keith_miller, msaboff, saam, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
chenfeng
var sTime = Date.now();
var curTime = new Date();
for (var i = 0; i < 10000; i++) {
curTime.setDate(i);
}
console.log(Date.now() - sTime)
The execution time of the above code in different browsers:
Wkwebview: 16000ms
Safari: 120ms
Chrome: 3ms
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/49854826>
Yusuke Suzuki
Now, Safari's perf is on per to Chrome.
Note: previously, JSC uses localtime_r. But this is super slow. Now we use ICU instead.
*** This bug has been marked as a duplicate of bug 218348 ***