mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-10-22 19:52:14 +08:00
The Tauri backend is primarily the control plane for IPC, config generation, tray/window events, and mihomo API calls. The proxy data plane runs in the mihomo sidecar/service process, so allowing up to 16 runtime workers adds scheduling headroom without clear startup benefit. Setup benchmark used isolated HOME/XDG dirs, isolated mihomo IPC sockets, sidecar mode, disabled TUN/system proxy defaults, and graceful shutdown after setup on an 18-thread host. | limit | workers | blocking | setup async avg/max | avg threads | | --- | ---: | ---: | ---: | ---: | | old | 16 | 64 | 742.2ms / 1163.4ms | 34.5 | | old | 8 | 32 | 650.8ms / 680.9ms | 27.0 | | old | 4 | 16 | 681.5ms / 708.1ms | 23.8 | | new | 16 | 32 | 682.8ms / 747.0ms | 35.3 | | new | 8 | 16 | 650.1ms / 662.4ms | 26.0 | | new | 4 | 8 | 639.3ms / 645.5ms | 22.1 | The 2x blocking pool reduced tail latency across the tested limits. Capping workers at 8 keeps enough concurrency for normal control-plane work while avoiding the 16-worker tail-latency outlier and reducing blocking-pool headroom from 64 to 16 on this host.