Opened 3 years ago

Last modified 13 days ago

#28257 new defect

MathJax causing unusual hanging in large notebooks

Reported by: embray Owned by:
Priority: major Milestone: sage-9.7
Component: notebook Keywords: days102
Cc: gh-evansdoe, egourgoulhon Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


A problem we kept having at Sage Days 102 is that one of the instructors created a (very good) tutorial notebook for Sage that is quite long, and simply opening it would cause users' web browsers to hang, possibly for several minutes on slower machines.

It has since (because of this problem, in part) been broken up into several smaller notebooks, but you can see the original large notebook here:

This would hang on Firefox and Chrome (in both cases going so slowly that the browser will interrupt execution several times and prompt the user to either wait, or permanently halt execution of the script, at which point Latex rendering stops working, and sometimes the page doesn't finish loading).

I've also observed this problem on some other large-ish notebooks such as

Yes, MathJax can be slow at times, but it's supposed to lazily do typesetting in the background once the page has loaded. However, in this case, it seems to be hanging the whole page before the DOM is even fully loaded.

While this is happening, MathJax displays a message in the corner of the page of Loading [MathJax]/extensions/Safe.js. So whatever this Safe.js extension is, it seems to cause serious problems on large notebooks.

Furthemore, the notebook we were having problems with doesn't actually have that many equations in it, so it's not a problem of slow rendering. I actually extracted all the equations from the notebook and pasted them into a single cell, and it renders almost immediately. The problem seems to have more to do with just the size of the HTML page.

Change History (8)

comment:1 Changed 3 years ago by egourgoulhon

  • Cc egourgoulhon added

comment:2 Changed 2 years ago by embray

  • Milestone changed from sage-8.9 to sage-9.1

Ticket retargeted after milestone closed

comment:3 Changed 2 years ago by mkoeppe

  • Milestone changed from sage-9.1 to sage-9.2

Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.

comment:4 Changed 19 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:5 Changed 14 months ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

comment:6 Changed 9 months ago by mkoeppe

  • Milestone changed from sage-9.4 to sage-9.5

comment:7 Changed 5 months ago by mkoeppe

  • Milestone changed from sage-9.5 to sage-9.6

comment:8 Changed 13 days ago by mkoeppe

  • Milestone changed from sage-9.6 to sage-9.7
Note: See TracTickets for help on using tickets.