mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-23 21:12:28 +08:00
* perf(core): remove redundant copies on service IPC paths Allocation and copy trims on the service IPC hot paths; the wire format is untouched: - store the owner session proof as Arc: active_service_session() retrieval becomes a refcount clone instead of a 64-char string copy per call (~12 call sites, including the frontend-polled log path). The one external caller takes Proof: Borrow<OwnerSessionProof> so its four test closures stay unchanged. - build the session token hex with one allocation instead of 32 format! allocations plus Vec growth (35 -> 1 allocations measured), mirroring owner_identity::encode_token. - reuse one RuntimeFileRequest across the provider cache-sync chunk loop; only .offset changes per chunk. - move the proposed session token out of StartClashRequest on success instead of cloning it up-front. - report the non-actionable service status by reference before set_status takes ownership. - hoist the macOS install markers to LazyLock, pass osascript args as an array, compare the install-wait core name via the requirement array, and log the silent-updater version by reference. * fix(core): gate the LazyLock import to macOS The install-marker static is the only LazyLock user in the module and is macOS-gated; the ungated import made clippy -D warnings fail the Linux and Windows builds. Co-locate the import with its cfg.