Closed TomGeorge1234 closed 1 year ago
I did look into this. It seems like the multi threading may not be an option as it seems like matplotlib does not allow one to pre-render and store plots.
My idea was to pre-render the plots in a list(a dict rather) using multiple threads and then use these pre-rendered plots to make the animation.
Another ad-hoc idea maybe to render parts of the video and then stitch them together. This will require saving the gifs on the disk.
Maybe someone has a better idea?
Thanks for looking into it!
Hmm ok, so multithreading is out. I think, long run, I want to revamp how RiaB does plotting. Like you said, we shouldn't be replotting the environment each time we make a new frame. @SynapticSage has mentioned this as well and it could be worth our/my time particular in light of the Env.render() necessity from RL environments. I'm quite busy rn but I'll have a think and leave this issue open.
As mentioned in #60 this is feature (hopefully) coming in 2.0
Animations are slow. Long run the fix for this is to have plotting done in a more structured way so the whole frame doesn't need to be updated on each frame, just the changing comments then we can put
blitting=True
Another good solution could be to multithread this. Split time span into segments and do each one on another thread.