Skip to content

[cinnamon/windowManager] PERF: Batch workspace-switch animations#13421

Closed
carsteneu wants to merge 2 commits intolinuxmint:masterfrom
carsteneu:perf/animation-batching
Closed

[cinnamon/windowManager] PERF: Batch workspace-switch animations#13421
carsteneu wants to merge 2 commits intolinuxmint:masterfrom
carsteneu:perf/animation-batching

Conversation

@carsteneu
Copy link
Copy Markdown
Contributor

Prevent compositor "overload" when switching workspaces with many windows.

  • Added animation queue with MAX_CONCURRENT_ANIMATIONS = 10 limit
  • Process animations in batches instead of starting all simultaneously
  • Each completed animation triggers the next from queue

Without batching, 100+ windows create 100+ parallel Clutter timelines, causing frame drops and compositor stutter.

I had this problem because I often have more than 100 windows open across 12 workspaces. (Really? Yes, really.)

With the fix, switching between workspaces is noticeably faster and smoother.

Cheers, Carsten

Prevent compositor overload when switching workspaces with many windows.

- Add animation queue with MAX_CONCURRENT_ANIMATIONS = 10 limit
- Process animations in batches instead of starting all simultaneously
- Each completed animation triggers the next from queue

Without batching, 30+ windows create 30+ parallel Clutter timelines,
causing frame drops and compositor stutter.
@mtwebster
Copy link
Copy Markdown
Member

Your use-case is exceptional - let's just skip the animation if there are more than so many windows open. I don't like this added complexity here. This won't ever be an issue for most users.

@carsteneu
Copy link
Copy Markdown
Contributor Author

Thats true, not so special if you think about 10 or 20, but it is also more snappy if there are only a few windows on standard 4 workspaces. I think it will also count on older hardware.

@mtwebster
Copy link
Copy Markdown
Member

I don't like the added complexity, or the effect you get with this - it's distracting to change workspaces and then have to wait extra time for the overflow to catch up.

Again I think the best answer here is to skip the animation in extreme situations - get the window list immediately in _switchWorkspace and add a length check to the early return for skipping the animation. I think the max could be increased to at least 20 also.

@mtwebster mtwebster closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants