Tauri and the performance of WebKit

Published: 2023-03-01 10:30:30

Just a Brief note about Tauri VS Electron and the performance of WebKit

Tauri and the performance of WebKit

I've always been a opponent of Electron Apps. Even now, my Slack regularly pauses for seconds I suppose because the Garbage Collector has to do its thing.

Lately, however, I've worked on a Mastodon Client written in Dioxus. Dioxus runs native Rust code and sends Dom Updates to a Tauri Webview. The difference in Ram and Performance is staggering. Much more lightweight because it uses the System Webview, and much faster because it's not Javascript. I've come to the conclusion that Electron itself is probably fast enough, but its the Javascript that causes it to crawl. (Obviously, my tiny app doesn't compare to Slack, but I've also done some simple-enough Electron Experiments).

And it makes sense: WebKit has seen tremendous amounts of investments to make it as fast as possible. CSS can do GPU based transforms, everything is heavily optimised. I'd venture that WebView rendering is just as fast as native (in the general case). What makes Electron slow is Javascript.