Refresh rate #657
tom-sherman
started this conversation in
Ideas
Replies: 1 comment
-
If folks have Ink apps that are relatively performance intensive (and ideally quite standalone/minimal) please share them as a reply. I'm just dipping my toes in here and don't have many good cases to benchmark against. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don't have a specific solution here, so opening it as a discussion instead of an issue.
Ink's refresh rate is currently locked to 30fps. This was discussed and implemented in #212
ink/src/ink.tsx
Line 56 in 4ed6267
I think it's time to reconsider locking the refresh rate to such a low value.
Firstly, Ink is primarily an input/output UI. Locking the refresh rate below the screen refresh rate for inputs leads to sluggish feeling TUIs.
In newer versions, React comes with it's own scheduler. It uses concurrent rendering and time slicing to improve performance automatically across component boundaries. In even newer versions, the user can opt into non-priority updates with transitions. I believe we should now be able to defer this throttling and scheduling to React itself for optimal performance, instead of locking it in the renderer.
I one way to achieve this we should be able to have non-throttled renders of high priority state updates (or maybe we lock this to the screen refresh rate), and then throttle only low priority transitions at 30 or even 15fps.
So, should Ink unlock the framerate?
Related discussions
Beta Was this translation helpful? Give feedback.
All reactions