Page MenuHomePhabricator

Syntax highlighting causes Firefox tab to freeze on long pages while editing
Closed, ResolvedPublicBUG REPORT

Description

I normally have syntax highlighting turned on while editing because I am often trying to spot syntax issues. When I try to add a template to a large page in Firefox 77.0.1 on Linux using the 2010 source editor, the tab will freeze for an extraordinarily long time.

Steps to Reproduce:

  1. Open w:Hinduism for editing in the 2010 source editor
  2. Enable syntax highlighting
  3. Near the top of the article, start typing a template

Actual Results:
The page freezes, not processing any inputs (including clicking the button to disable the syntax highlighter). Eventually, Firefox will blank the tab and replace it with a loading icon. While the page is frozen, the Firefox developer tools can not be opened and are unusable if previously opened. Other tabs are unaffected. During this time, the firefox process for this tab uses 100% CPU. There is no excess memory usage.

This has lasted in excess of 30 minutes.

Eventually, the syntax highlighter will finish and the tab will unfreeze. This will cause any inputs from when the page was frozen to be played back. If those inputs closed the template markup, the page will lock up again.

Expected Results:
If syntax highlighting takes more than a few seconds, kill it.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

While the performance on this example page is still not great, I believe it's already much better after the fixes we did in T270237. @AntiCompositeNumber, are you able to test this again and let us know if it behaves different now?

There are a few hiccups, but nothing like the full tab lockup that occurred previously. I'd call this fixed.

Wonderful, thanks a lot for the fast response!