RESOLVED FIXED 165268
Every WKWebView initialization spends a few milliseconds hitting the disk
https://bugs.webkit.org/show_bug.cgi?id=165268
Summary Every WKWebView initialization spends a few milliseconds hitting the disk
Tim Horton
Reported 2016-12-01 13:13:50 PST
Every WKWebView initialization spends a few milliseconds hitting the disk
Attachments
Patch (16.96 KB, patch)
2016-12-01 13:14 PST, Tim Horton
no flags
Patch (19.97 KB, patch)
2016-12-01 13:56 PST, Tim Horton
beidson: review+
Tim Horton
Comment 1 2016-12-01 13:14:17 PST
Tim Horton
Comment 2 2016-12-01 13:16:31 PST
By my measurement (on iOS), this cuts total time initializing 19 WKWebViews (after the first one) by ~4x (~8ms to ~2ms per view).
Tim Horton
Comment 3 2016-12-01 13:40:09 PST
Tim Horton
Comment 4 2016-12-01 13:56:59 PST
Brady Eidson
Comment 5 2016-12-01 14:04:57 PST
Comment on attachment 295891 [details] Patch If I were somebody else, I might say try to keep any calculated path that's a CString as a CString as long as possible. But I guess they all get converted to Strings eventually.
Tim Horton
Comment 6 2016-12-01 14:07:04 PST
(In reply to comment #5) > Comment on attachment 295891 [details] > Patch > > If I were somebody else, I might say try to keep any calculated path that's > a CString as a CString as long as possible. > > But I guess they all get converted to Strings eventually. Yep. Also, stringByResolvingSymlinksInPath is used for similar things all over the place and goes right back to String. I think if we wanted to do that we might want to have a special type just for that purpose.
Tim Horton
Comment 7 2016-12-01 14:31:54 PST
Tim Horton
Comment 8 2016-12-01 14:37:30 PST
Note You need to log in before you can comment on or make changes to this bug.