Skip to content

Refine adaptive "speed optimization" to have faster initial render. #121

@MatthewPeterKelly

Description

@MatthewPeterKelly

Follow-up to #119, which added support for dynamically adjusting the render quality to get faster frame rates. That implementation just hard-codes the speed optimization level at 2... but we could do better.

We want to control frame rate, and we have the "speed optimization parameter" as the control knob. I think we can use a simple controller to achieve the desired results here:

if (measured_frame_rate < lower_threshold) {
    optimization_level++;  
} else if (measured_frame_rate > upper_threshold) {
    optimization_level = max(0, optimization_level-1);
}

Using a large deadband should help with chatter, but we might also want to filter the measured framerate. Probably a simple first-order IIR filter would work... but we could also use a moving average. We'll need to do some experiments!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions