-
Notifications
You must be signed in to change notification settings - Fork 56
Description
I’m experiencing noticeable lag / stutter in the COSMIC top bar on Fedora 43, with custom applets enabled. The issue becomes much more pronounced as soon as I integrate a custom Control Center into the top bar.
This does not appear to be caused by heavy animations or layout mistakes in my code — the lag affects the entire top bar, including clock updates, hover feedback, and pointer movement responsiveness.
Environment
OS: Fedora 43
Session: Wayland
Desktop: COSMIC
Panel: cosmic-panel (current git / distro build)
Hardware: (can provide if needed)
What I’m building
I’m developing a custom Control Center intended to live behind a panel button (similar to macOS Control Center).
Architecture-wise:
Panel button itself is layout-stable
Control Center opens as a popup
Animations are transform/opacity-based
Layout sizes are cached
dt is clamped
No layout animation on the panel itself
Despite these precautions, placing the Control Center entry in the top bar causes the entire panel to become laggy, even when the Control Center is closed.
Observed behavior
Top bar feels sluggish on pointer movement
Hover effects stutter
Animations skip or feel uneven
Clock / tray updates are less smooth
Lag persists even when Control Center is not actively animating
Importantly:
The lag is visible across the whole panel, not just my component
Removing the Control Center integration improves responsiveness noticeably
This suggests panel-level redraw / invalidation pressure rather than applet logic
Expected behavior
Top bar should remain smooth and responsive
Adding a panel entry (even for a complex popup) should not degrade overall panel performance
Panel should ideally be resilient to heavier popup logic living behind a button
What I’ve already tried
Detaching popup from panel layout
Two-phase popup attach (attach → animate next frame)
Clamping animation delta time
Avoiding layout changes during animation
Pre-warming icons / fonts / layout
Testing with minimal animations
The issue persists even with conservative animation strategies.
Additional notes
This may be related to:
Panel-wide invalidation frequency
Iced view tree rebuild cost for always-on UI
Pointer-motion driven redraws
Panel surfaces having lower compositor priority
Happy to provide logs, traces, or test patches if needed.