#573

[Performance] Cottontail is much less efficient than Bun

Openhesprsopened 21d ago

I shifted mainProcess between bun and cottontail for my App and did some profiling, comparing against its Electron version, the result was terrifying:

MetricElectronElectrobun (Cottontail)Electrobun (Bun)
Installed size338 MiB102 MiB107 MiB
Startup time0.6 s1.43 s0.98 s
Stable memory853 MiB1023 MiB617 MiB

As clearly shown, Electrobun + Cottontail is even less efficient than Electron, and consumes much more memory than its counterpart in Bun.

The increased startup time compared with Electron can partially be attributed to the inferior optimization of WebKitGTK. But the performance degradation of Cottontail is real and clear.

I don't know whether this is a configuration issue or a WebKitGTK limitation. This app is a personal test project, I can give you the source code if you need.

Environment

Linux (NixOS 26.11) + WebKitGTK 4.1 + Electrobun 2.0.2.

Activity

0

No activity yet.