jupyter_tensorboard icon indicating copy to clipboard operation
jupyter_tensorboard copied to clipboard

Slows Jupyter Notebook start

Open djherbis opened this issue 4 years ago • 3 comments

Hi when I enable the tensorboard extension in my Jupyter Notebook server it adds an extra 4s for the server to become reachable.

I filed this bug https://github.com/jupyter/notebook/issues/4818 to see if Juptyer extensions in general could be loaded lazily, but I'm curious if this problem could be solved on the tensorboard side?

Any idea why it adds this much time to the server startup and if it could be made faster?

djherbis avatar Aug 17 '19 15:08 djherbis

Looks like it's loading the manager that is the 'slow' part: https://github.com/lspvic/jupyter_tensorboard/blob/5d6fa13ecfeb27ee446ed8533c5236e21ba79b3a/jupyter_tensorboard/handlers.py#L22

Looks like even in a 'warmed' env (jupyter notebook run a few times), this adds ~2s.

Wonder if we could make loading it lazy.

djherbis avatar Aug 21 '19 01:08 djherbis

And from there the slowdown is caused by: https://github.com/lspvic/jupyter_tensorboard/blob/5d6fa13ecfeb27ee446ed8533c5236e21ba79b3a/jupyter_tensorboard/tensorboard_manager.py#L19

Source: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/default.py

djherbis avatar Aug 21 '19 01:08 djherbis

can someone provide some insights to how we can solve this slowdown? its been more than 2 years and this issue is still single-handedly blocking all kaggle notebook users from using tensorboard in kaggle notebook

Jason-Khan avatar Mar 12 '22 23:03 Jason-Khan