Closed Bug 760954 Opened 12 years ago Closed 12 years ago

View source slower in Firefox 15 (hangs with high cpu for seconds) on some (many?) HTML pages

Categories

(Toolkit :: View Source, defect)

x86
macOS
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla15
Tracking Status
firefox15 + fixed

People

(Reporter: asqueella, Assigned: smontagu)

References

Details

(Keywords: perf, regression, testcase)

Attachments

(4 files, 2 obsolete files)

STR: open attached file, select Tools -> Web developer -> Page source (Cmd+U). Actual results: the page source is empty for a few seconds, during which Firefox uses 100% cpu doing reflow. Expected results: view source should display as fast as in Firefox 14. Regression window points to bug 751841: Good: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-macosx64/1338359573/firefox-15.0a1.en-US.mac.dmg (built from http://hg.mozilla.org/integration/mozilla-inbound/rev/b613ac5ff64a) Bad: http://ftp.mozilla.org/pub/mozilla.org/firefox/tinderbox-builds/mozilla-inbound-macosx64/1338360714/firefox-15.0a1.en-US.mac.dmg (built from http://hg.mozilla.org/integration/mozilla-inbound/rev/e98f0fc3d02e) According the the built-in profiler, with the patch we spend 4.5 seconds on my machine under PresShell::DoReflow, whereas before the patch it was 1 second. I tried to simplify the page and I see the slowdown with 1) a long line with entity references (") 2) many lines, with or without entity references
Attached file testcase 1: many lines (deleted) —
Attached patch Patch (obsolete) (deleted) — Splinter Review
This possibly needs to be split into two bugs, something like a) performance is bad with lots of elements with unicode-bidi: isolate; b) view-source uses lots of elements with unicode-bidi: isolate. This is a patch for b), i.e. it fixes the issue with view-source slowdown, but there could be similar slowdown in other cases.
Assignee: nobody → smontagu
Attachment #629592 - Flags: review?(ehsan)
Attached patch Correct diff (obsolete) (deleted) — Splinter Review
Attachment #629592 - Attachment is obsolete: true
Attachment #629592 - Flags: review?(ehsan)
Attachment #629593 - Flags: review?(ehsan)
I have *no* clue where that first hunk is coming from :(
Attached patch Correct diff (deleted) — Splinter Review
Attachment #629593 - Attachment is obsolete: true
Attachment #629593 - Flags: review?(ehsan)
Attachment #629594 - Flags: review?(ehsan)
Attachment #629594 - Flags: review?(ehsan) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Thanks for the quick fix! The issue is now fixed for me.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: