You might want to break the dependence of this and various other cells on `now`, which causes most of this notebook to completely rerender itself 60 times per second, leaks a lot of memory, and churns through lots of of CPU. One possible approach is @jrus/misc#animate, as used e.g. by @jrus/sinebar
If I scroll to a place where a couple of the graphics are open, my browser pops up a "this webpage is using significant memory" warning, and memory use goes up to multiple gigabytes (I was looking at the wrong readout just a moment ago). It also uses ~99% of the CPU core it is running on.
(Sorry if this sounds critical. I think this is a very cool notebook!)
Thanks, I've been looking for a way to deal with this, and I will check out @jrus/misc#animate.
I had hoped that `await visibility();` inside of this function would keep it from animating (and churning through memory) when the cell is off the screen. Maybe the function is being re-entered because it is called with new argument values (when the value of `now` updates), even when the previous invocation is still awaiting visibility(), though.
`await visibility()` wasn't early enough in the function. This appears to have fixed the memory warnings, at least on my computer. I still haven't looked at the metrics, or applied your solution to the other (less problematic) functions, so I am leaving this comment unresolved for now. Thank you for your help on this, and your kind words.