Skip to content

refactor: cache more observed properties#695

Merged
Samillion merged 2 commits intomainfrom
cache_observed_props
Apr 20, 2026
Merged

refactor: cache more observed properties#695
Samillion merged 2 commits intomainfrom
cache_observed_props

Conversation

@Samillion
Copy link
Copy Markdown
Owner

@Samillion Samillion commented Apr 20, 2026

Based on upstream mpv: mpv-player/mpv#17766

Changes

  • Re-order local state items to match upstream mpv
  • Rename state.new_file_flag to state.file_loaded to match upstream mpv
  • Cache observed properties: osd-dimensions and osd-scale-by-window

Performance Difference

  • Using stats.lua page 0 to compare
  • We're almost the same as osc.lua with around ~1ms difference
    • modernz.lua is slower by ~1ms
    • Still not sure if this is purely due to difference in what's being rendered/tick (more elements, options and such) or something needs to be optimized.

@Samillion Samillion merged commit fa55117 into main Apr 20, 2026
@Samillion Samillion deleted the cache_observed_props branch April 20, 2026 22:16
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