Description
Every animation frame in renderer.js, the code unconditionally computes getFlowSpeedProfile(), getFlowDirectionValue(), and flowTravelDistance regardless of which theme is active. These computations create merged settings objects and parse theme config — all wasted work for 11 out of 12 themes. On multi-monitor setups with multiple overlay windows, this waste is multiplied.
Steps to Reproduce
- Launch Paraline with any theme other than flowBorder active.
- Open the DevTools Performance tab on the overlay window.
- Record a profile and look for
getFlowSpeedProfile, getFlowDirectionValue in the call tree.
- Observe that these functions execute every frame despite being irrelevant to the active theme.
Expected Behaviour
Flow border calculations should be guarded behind if (visualizerState.selectedTheme === "flowBorder").
Actual Behaviour
The computations run unconditionally on every animation frame (~16ms interval at 60fps).
Description
Every animation frame in
renderer.js, the code unconditionally computesgetFlowSpeedProfile(),getFlowDirectionValue(), andflowTravelDistanceregardless of which theme is active. These computations create merged settings objects and parse theme config — all wasted work for 11 out of 12 themes. On multi-monitor setups with multiple overlay windows, this waste is multiplied.Steps to Reproduce
getFlowSpeedProfile,getFlowDirectionValuein the call tree.Expected Behaviour
Flow border calculations should be guarded behind
if (visualizerState.selectedTheme === "flowBorder").Actual Behaviour
The computations run unconditionally on every animation frame (~16ms interval at 60fps).