# Firefox 4 needs over one minute to display a webpage with MathJax content in conjunction with -moz-column-count and hangs

RESOLVED WORKSFORME

## Status

### ()

Core
Layout
RESOLVED WORKSFORME
7 years ago
5 years ago

## Details

(Reporter)

### Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0

Firefox 4 needs over one minute to render that page with MathJax (<http://www.mathjax.org/>) content in conjunction with -moz-column-count CSS:

<http://tools.rene-schwarz.com/demos/ff4-hangs-mathjax-columns/>

During rendering Firefox 4 hangs and is not usable for over one minute. In Opera 11.01 page rendering tooks 2 or 3 seconds (depending on connection speed) and Opera is normally usable for this period.

I suppose that this is a problem with the permanent re-ordering of page elements due to -moz-column-count. So it is not surprising that the page rendering in Opera is fast -- Opera doesn't support the CSS column-count property yet. But Chrome, supporting the CSS column-count property, doesn't hang during page parsing and is really fast.

BTW: Chrome 10 is crashing on my system trying to parse that page.

Reproducible: Always

Actual Results:
Firefox 4 hangs over one minute, permanently reordering column elements

Expected Results:
Firefox 4 is usable the time during page request and rendering, rendering should take no longer than a few seconds.
(Reporter)

### Updated

7 years ago
Duplicate of this bug: 646438
(Reporter)

### Comment 2

7 years ago
After some tests a (temporary) solution could be to define the page content with no columns initially (-moz-column-count: 1) and to wait until page processing of MathJax is complete and then to change the content to have two columns (-moz-column-count: 2). You can see that here:

<http://tools.rene-schwarz.com/demos/ff4-hangs-mathjax-columns/solution.html>

Now the page parses in normally in Firefox 4 within a few seconds, first with no columns and after MathJax' rendering is complete with two columns. Achieved with this code snippet of JavaScript at the end of the page:

MathJax.Hub.Queue(function() {
document.getElementById('content').setAttribute("class", "twocols");
});

### Comment 3

7 years ago
Reproduced. Browser slows down/hangs for several seconds (depends on comp speed). Workaround in comment 2 is fast.

### Comment 4

7 years ago
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.2a1pre) Gecko/20110401 Firefox/4.2a1pre

### Updated

7 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [bugday-20110401]

### Comment 5

7 years ago
It can be reproduced on Linux x86

build: Mozilla/5.0 (X11; Linux i686; rv:2.2a1pre) Gecko/20110401 Firefox/4.2a1pre

### Comment 6

5 years ago
Works for me, FF20 on Linux64.  The page displays an error message, so maybe
it doesn't trigger the bug as it used to?

René, can you provide a page that still shows the problem?  Thanks.
Component: General → Layout
Flags: needinfo?(mail)
Keywords: hang
Product: Firefox → Core
Whiteboard: [bugday-20110401]
(Reporter)

### Comment 7

5 years ago
Hi Mats, the demo sites I posted on March 30, 2011 have now been updated to load MathJax properly again. The issue persists for me on FF 20.0.

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:20.0) Gecko/20100101 Firefox/20.0
Flags: needinfo?(mail)

### Comment 8

5 years ago
The URL works fine for me in FF20 on Win7 and Linux64.  It takes 2-3 seconds for
the page to convert the markup to math equations, but then it works fine.
The rendering looks awful on OSX 10.7 for some reason, but it doesn't hang.

Maybe it's a font problem?  Do you have the STIX fonts installed?
Severity: critical → normal
(Reporter)

### Comment 9

5 years ago
Hi Mats, I checked the demos again and noticed that everything is working now with FF 20. I don't know why the issue occurred when I was trying to render the demo again with FF 20; there may have been a plugin or addon hanging at the time of testing.

Nevertheless, installing the STIX fonts for MathJax is not necessary in order to render TeX content with MathJax; however, doing so will result in a speed improvement of the rendering.

When I posted this bug two years ago, FF stopped working entirely due to the bug described. This behavior is now gone apparently.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.