festival icon indicating copy to clipboard operation
festival copied to clipboard

CPU usage while idle

Open hinto-janai opened this issue 1 year ago • 0 comments

What

Not Festival or shukusai itself, but both cpal and souvlaki have event loops that poll many times a second, instead of a parked thread + wakeup design.

Problem

This causes a small, but consistent amount of CPU time to be used, even when Festival itself is paused, isn't rendering any frames, or doing anything really. This is so stupid.

Solution

Fork, patch, use as submodule.

souvlaki is easy to fix.

cpal is a mess, and it only affects Windows/macOS (Linux Festival uses pulseaudio bindings) but maybe eventually fix it (or just stop using cpal altogether).

hinto-janai avatar Jun 24 '23 21:06 hinto-janai