[Webkit-unassigned] [Bug 221654] New: WKWebView DOM calls are 200x-500x slower than WebView (Legacy)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 9 23:20:00 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221654

            Bug ID: 221654
           Summary: WKWebView DOM calls are 200x-500x slower than WebView
                    (Legacy)
           Product: WebKit
           Version: Safari 14
          Hardware: Mac (Apple Silicon)
                OS: macOS 11
            Status: NEW
          Severity: Blocker
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jonathan at tumult.com

The original macOS WebKit API, released in 2003, enables a whole class of different native mac apps because it is over 2 orders of magnitude faster to communicate with the DOM.

>From my tests, using the original DOM API is about ~200x faster than the equivalent -evaluateJavaScript: calls using a WKWebView.  The newer callAsyncJavaScript is about ~300x slower, though I am uncertain why.  A DOM Bridge I developed recreates the WebView Legacy API and allows for synchronous calls is about ~500x slower.

>From what I can tell, the bottleneck is IPC round tripping.

Because they are so much slower and it requires JavaScript code along with a callback mechanism, it discourages creating Mac applications that have deep web integration, such as Tumult Hype [https://tumult.com/hype]. If WKWebView was the only option when Hype was developed, it would either not have been made, or not have been made as a Mac app, because the advantages evaporate in the face of a good API.

WKWebView needs a performant equivalent of the WebView DOM API. I am surprised WebView was deprecated without providing this.

-- 
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/20210210/14f55d3e/attachment.htm>


More information about the webkit-unassigned mailing list