Skip to content

perf(brightness): cache the monitor's max VCP value instead of reading it before every write - #1229

Open
YelovSK wants to merge 1 commit into
amnweb:mainfrom
YelovSK:perf/brightness-cache-vcp-max
Open

YelovSK wants to merge 1 commit into
amnweb:mainfrom
YelovSK:perf/brightness-cache-vcp-max

Conversation

@YelovSK

@YelovSK YelovSK commented Nov 4, 2026

Copy link
Copy Markdown

_vcp_write read the monitor's max value over DDC before every write. The max is now remembered per monitor, so writes skip the read. Regular brightness reads keep it up to date.

On my two monitors, a read and a write each took about 60ms, so a write went from about 120ms to 60ms. On one of them, a write straight after a read also failed instantly every time, which triggers the 100ms retry sleep. Writes with no read before them didn't fail.

This makes link_monitors (#1227) feel more responsive, since monitors are written one after another.

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