No description
Find a file
Gavin John d4c5714c10 perf(toplevel_info): optimize send_toplevel_to_client
PR #1279 tried to throttle `send_toplevel_to_client`, which was rejected. This takes (what I think is) a better approach, and instead makes some optimizations. We delay grabbing the mutex until it's actually needed, and we also checks to see if the state actually needs to be resent. This resolves some lock contention, and also avoids having to generate the state in the first place. Since `wayland-rs` uses a single mutex to lock the entire state, this both massively reduces lock contention and avoids making (apparently quite a lot of) unnecessary computation.

I decided to give this one to AI since I'm a bit busy right now (although I am still manually writing the commit messages and descriptions). I think it generally did a pretty good job, although I did have to make a few manual tweaks. While I don't have any empirical data, cosmic-comp idle CPU has gone down from ~3% all-core to 0-0.5%, even stress testing it with far more windows open. I can't say it *liked* opening 30-some windows in 2 seconds, but after it finished opening them all, it was still buttery smooth. Overall very happy with the results.

Assisted-by: Claude:claude-4-opus
2026-06-16 18:09:28 +02:00
.github ci: Make sure we lint and test all features 2026-03-24 16:23:43 +01:00
cosmic-comp-config feat: allow naming pinned workspaces 2026-06-15 23:11:31 +02:00
data feat(tiling-exceptions): add exception for Thunderbird message compose dialog 2026-06-11 09:23:38 -06:00
debian Use automatic shared library dependency on libdisplay-info 2025-10-21 08:50:17 -06:00
examples fix: update test 2026-03-13 15:56:42 -04:00
resources i18n: translation updates from weblate 2026-05-25 23:11:40 +00:00
src perf(toplevel_info): optimize send_toplevel_to_client 2026-06-16 18:09:28 +02:00
.gitignore Rework source filtering. 2023-01-04 01:52:16 -08:00
build.rs Revert "fix: use SOURCE_GIT_HASH when building for pop ci" 2026-06-15 12:16:32 -06:00
Cargo.lock fix(dbus): Block on creation of zbus connection to avoid deadlock 2026-06-09 18:09:36 -04:00
Cargo.toml fix(dbus): Block on creation of zbus connection to avoid deadlock 2026-06-09 18:09:36 -04:00
flake.lock Update and fix flake.nix 2024-09-02 19:44:51 +02:00
flake.nix fix: add missing libdisplay-info library into flake.nix 2025-01-12 13:09:03 +01:00
i18n.toml i18n support 2023-07-06 00:04:34 +02:00
LICENSE Initial commit 2021-12-15 17:25:15 +01:00
Makefile fix: add git hash to .cargo/config when vendoring 2026-06-15 12:16:32 -06:00
rust-toolchain.toml chore: bump MSRV to 1.90 2025-12-22 16:29:22 +01:00
rustfmt.toml chore: format for Rust 2024 2025-10-22 23:55:11 +02:00