linebender / linebender/druid

VSYNC not working on macOS

Open
#1,083 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug shell/mac
Dominant language
Rust
Stars
9.7k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I observed an abnormal CPU usage when using the `AnimFrame` mechanism.

Then I run the `druid-shell` `perftest` example and I got:
- Initial window size: Period of 2-3 ms, 56% CPU
- Maximized: Period of 10-12 ms, 141% CPU

I would expect something closer to 16ms for a refresh rate of 60Hz.

My computer is a MacBook Pro 15" from 2018 with Mojave (10.14.6)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the druid-shell perftest example on macOS and trace the AnimFrame mechanism and its VSYNC scheduling. Compare the observed 2–12 ms periods and CPU usage with the expected roughly 16 ms refresh interval; done means the animation is synchronized near 60 Hz without abnormal CPU usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.