Open agoose77 opened 3 years ago
OK, I created an implementation of a non-blocking equivalent. I'm sure there are some bugs:
This notebook uses a thread-based trampoline to execute the various blocking waits without interrupting the kernel. The results are displayed asynchronously using the ZMQ event loop (used by the kernel), and the executing cell's context is temporarily restored to ensure results end up (visually) in the right place.
Clearly this would need some more work to replace the existing contents of JupyROOT.helpers.utils
, but I hope that it's a starting point for discussion
@agoose77 thank you very much for this extensive research you did!
Do you think you could apply this to JupyROOT.helpers.utils
?
@etejedor sure, I'll add this to my TODO list :)
After importing
ROOT
in a Jupyter Notebook in which Jupyter Widgets are used, the performance of figure interactions like panning and zooming drastically falls off. After identifying ROOT as the culprit, I found that the poor performance is caused by sleeping invoked during these hooks which are run for each kernel execution.