#573
[Performance] Cottontail is much less efficient than Bun
I shifted mainProcess between bun and cottontail for my App and did some profiling, comparing against its Electron version, the result was terrifying:
| Metric | Electron | Electrobun (Cottontail) | Electrobun (Bun) |
|---|---|---|---|
| Installed size | 338 MiB | 102 MiB | 107 MiB |
| Startup time | 0.6 s | 1.43 s | 0.98 s |
| Stable memory | 853 MiB | 1023 MiB | 617 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
0No activity yet.