Skip to content

perf(shell): smooth flyout animations and add top bar hover toggle - #5

Open
CJKaufman wants to merge 1 commit into
lilidoxdev:mainfrom
CJKaufman:perf/smooth-animations
Open

CJKaufman wants to merge 1 commit into
lilidoxdev:mainfrom
CJKaufman:perf/smooth-animations

Conversation

@CJKaufman

Copy link
Copy Markdown

Summary

  • Eliminates per-frame GUI-thread bottlenecks during dock, panel, and top bar flyout animations.
  • Adds a opHoverEnabled preference (default rue) under Settings > Docks and panels > Visibility to disable top-edge hover reveal when desired.

Performance changes & measurements

Measured on Windows 11 with a 200 Hz primary display (2560x1440) and 75 Hz secondary display (2560x1080):

  1. Top bar flyout SetWindowRgn throttling (src/frontend/surface_geometry.py): �ridge.top previously called window.setMask() on every pixel of panelHeight/panelWidth animation (86 calls / 104.9 ms). Throttling to 100 ms with a trailing settle timer reduced this to 10 calls (12.3 ms).
    • Top bar flyout frames (perf_probe_topbar.py): p95 dropped from 10.15 ms to 6.85 ms, p99 dropped from 15.34 ms to 9.96 ms, max dropped from 77.31 ms to 31.27 ms, frames >10 ms dropped from 26/510 to 4/505 (200.4 FPS median).
  2. Dock SetWindowRgn & unused svg_path / simplified (src/frontend/surface_geometry.py, src/frontend/bridge_theme.py): Removed offset from the Dock input_masks key so setMask() runs only when Dock dimensions/attached state change, skipped shell_path() and QPainterPath.simplified() when glass is disabled/reduced, and moved svg_path() to lazy evaluation inside Bridge.surfaceForScreen().
    • Dock frames: median improved from 6.22 ms (160.9 FPS, 168.47 ms max) to 5.08 ms (196.8 FPS, 21.47 ms max).
  3. Per-frame SetWindowPos when glass is off (src/frontend/native_glass.py): When self.windows is empty (glass off or
    educedEffects), sync() no longer calls
    aise_content() on every surfaceChanged animation tick, only on handle changes or the periodic timer (136 calls / 293.6 ms -> 1 call /

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.

1 participant