I have to preface my question with an admission that I am a bloody noob, so please be kind. I might not be using the right jargon here, and so may be a little misled, but am keen to learn and will endeavor to describe as best as I can what is wrong.
The issue: the generator seems to be yielding correctly, but the animation does not show and the page to grinds to a halt.
I think the problem resides in how the reactive runtime environment consumes the cell containing the generator. I have looked at the runtime codebase and have noticed a lot of Promise chaining, and therefore the opportunity for manual garbage collection… so feel like I am missing this in my rewrite… and this is the cause for the sluggishness (memory allocation?).
Has anybody else encountered this when attempting a rewrite from scratch?
I really appreciate any help that can be offered. I am really sorry if I have been poor at communicating my issue here. Just let me know what more I can provide.
That worked perfectly! Thanks for your help. Though without seeing the code, would you have a recommendation as to why iterating over the generator would have caused the crash? I would get the anticipated logs… but the app would slow to a halt and the animation would not show. Any thoughts?
Thanks for all your help. I really appreciate your taking the time.
And then you need to start up some kind of run loop of your own to get your generator functions going.
window.requestAnimationFrame(step) is an alternative (non-generator-related) way to get code executing in a loop. Note that the callback given to requestAnimationFrame will already get passed the current timestamp, so when using requestAnimationFrame there is no explicit need to make your own timestamp generator.
@jrus, no problem. You are one-hundred-percent right in it being a stab in the dark without the code. Regardless, thanks for all your help. You definitely solved my issue. I suppose I just need to get more acquainted with promise chaining and generators if I am to understand what was the original issue in my code.