ipython/ipython — Issue #1071: Large html-notebooks hang on load on a slow machine
Author: pv
Created: 2011-11-30 15:01:10+00:00
State: open

I've noticed that sometimes, large html notebooks fail to load.

It goes like this:

1. Click on the notebook name when at http://localhost:8888
2. The notebook page starts to open in the browser as usual, but
3. The loading progress gets stuck at a point where there is a MathJax message "Processing math: 0%".
4. After that, the web browser (Chrome; same seemed to occur also on Firefox) tab is unresponsive and just consumes 100% CPU, and no progress seems to happen. Chrome offers to kill the tab process after a while (clicking "Continue" does not seem to help).

This does not happen always, sometimes the page opens after a while, but I had a notebook for which it seemed to occur in majority of the attempts.

I'm working with the HTML notebook with Google Chrome (15) running on a relatively slow machine (EEE 1000 laptop), and the notebook server + kernels running either on a server through SSH tunnel or on the same machine. When running the browser on a faster machine, this issue does not seem to happen. Ipython is from Git master (b9c427f25585d3). Problems seemed to occur regardless whether MathJax was installed locally or not.

Because of the MathJax message, I tried to check out what happens if I remove all calls to MathJax from Ipython. With this change, all notebooks seem to load reliably, and I haven't seen this issue to reappear, at least yet. Maybe there's some MathJax-related timing issue at page load time that can cause a deadlock?

I'll follow up if I learn something new. Also, suggestions on how to track this further could be useful.