-
-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworking the runtime #263
Conversation
After going round and round trying to do this with CE, I decided just to PoC it imperatively to see if it was going to work at all. It kinda does. My CPU has always seemed a little more eager than others have reported, so I wouldn't worry that the number seems to jump quite high in the gif, or that it's a little twitchy. This is similar behaviour to what I see on this machine from Elm apps. Will need to verify on other machines. <gif removed as I've noticed a bug> 🤦 Also, this is fast linked, not full linked. |
If you have any free time to take a look at this @armanbilge, that would be great (don't worry if not 😄). This appears to do the trick but probably doesn't do it the nicest way. |
208206d
to
dd11f7f
Compare
From my testing, this appears to be a vast improvement on pages that are idle between user interactions. I can't tell if there's any real impact on pages that do constant work - like games. We don't have a way of defining "options" for Tyrian yet (like Indigo's |
This looks like it'll work in a vast majority of cases - as you say, I'm not sure about games, where the model might be updated a fair bit. That said - I think we should put it live as is, as I suspect most people will be using Tyrian for static sites, and Indigo for games. In my experience, even if you use Indigo for games and Tyrian as the UI, the actual amount of time you spend updating Tyrian's model is far far less than Indigo |
Remove ModelHolder A model update triggers redraw Remove unused argument Call redraw on a rendering class Record last triggered time Minor refactoring Anemic Renderer Revert "Anemic Renderer" This reverts commit f297cb7. Imperative version, but it kinda works. Tidying up comments Use the model Ref to use all updates Replaced imperative impl with CE
dd11f7f
to
0980f66
Compare
This PR may not survive, I'm just using it so it's easier for me to check my own work.
So far I've done some refactoring. No suggestion that this is an improvement, but the exercise has helped me reacquaint myself with what's going on.
The idea is to do the following, from the issue comment:
Rough plan of attack:
Step 1 - Update pokes the renderer:
Step 2 - Render runs on a loop (again):
Something like that.