SubmarinerApp / Submariner

A Subsonic client for macOS
https://submarinerapp.com
BSD 3-Clause "New" or "Revised" License
133 stars 4 forks source link

Reduce progress update interval to 0.1 #169

Closed skyline75489 closed 11 months ago

skyline75489 commented 11 months ago

This significantly reduces CPU usage.

skyline75489 commented 11 months ago

I'm using an old MBP (Early 2015) and I noticed very high CPU usage while playing music (~50%). With this PR, the CPU usage drops to ~7% while playing.

NattyNarwhal commented 11 months ago

Looks like I ran the numbers before a year ago almost to this day. I reverted back to the 0.01 NSTimer instead of using KVO, but did notice that a 0.1 timer took less CPU time. I just don't remember why I didn't apply that change afterward.

NattyNarwhal commented 11 months ago

Oh, I think it might have been the sliders not adjusting constantly smoothly. I don't think it matters that much though.