Bug 196764 - Date.setDate is too slow in WKWebView
Summary: Date.setDate is too slow in WKWebView
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-10 00:20 PDT by chenfeng
Modified: 2020-06-21 03:41 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description chenfeng 2019-04-10 00:20:38 PDT
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
Comment 1 Radar WebKit Bug Importer 2019-04-12 10:13:47 PDT
<rdar://problem/49854826>