Closed
Bug 680402
Opened 13 years ago
Closed 13 years ago
Hang on certain site
Categories
(Core :: Layout: Text and Fonts, defect)
Tracking
()
RESOLVED
FIXED
mozilla9
People
(Reporter: alice0775, Assigned: jfkthame)
References
Details
(4 keywords)
Attachments
(4 files)
Build Identifier: http://hg.mozilla.org/mozilla-central/rev/f69a10f23bf3 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:9.0a1) Gecko/20110818 Firefox/9.0a1 ID:20110818030747 Browser hang Reproducible: Always Steps to Reproduce: 1. Open Firefox with clean profile 2. Open Page ( http://www.openspc2.org/JavaScript/benchmark/addText2/index.html ) 3. Actual Results: Browser hang Expected Results: Display page in about 3sec on 2.5GHz C2Q Regression window(cached m-c hourly), Works: http://hg.mozilla.org/mozilla-central/rev/b2aeaf724c8d Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101208 Firefox/4.0b8pre ID:20101208215553 Hang: http://hg.mozilla.org/mozilla-central/rev/0567fd4cf088 Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101208 Firefox/4.0b8pre ID:20101208230203 Pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b2aeaf724c8d&tochange=0567fd4cf088 In local built(m-c repository) built from 4861b72cc66d : hang built from 0bd4cd152565 : fast Triggered by: 4861b72cc66d Jonathan Kew — bug 553981 - handle Hangul Jamo sequences and other special cases when marking clusters. r=karlt a=roc
Reporter | ||
Comment 1•13 years ago
|
||
Reporter | ||
Comment 2•13 years ago
|
||
Assignee | ||
Comment 3•13 years ago
|
||
The pathological behavior here arises when we try to construct a single textrun that has many separate script runs within it. The code ends up calling SanitizeGlyphRuns each time it appends a new glyph run, and that iterates over all the existing runs, which means we get behavior that is of the order of O(n^2) where n is the number of distinct glyph runs in the complete textrun, or something horrible like that. The testcase here is a worst-case scenario because it has mixed scripts repeated over and over within a single string for which we construct a giant textrun. This patch should solve the problem by just calling SanitizeGlyphRuns once at the end of textrun construction, instead of repeating it for each added piece.
Assignee | ||
Comment 4•13 years ago
|
||
Tryserver builds with this patch available at https://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jkew@mozilla.com-df8cd5194cfd/.
Assignee | ||
Updated•13 years ago
|
Attachment #554556 -
Flags: review?(jdaggett)
Reporter | ||
Comment 5•13 years ago
|
||
The tryserver built is improved performance remarkably. (I expect early check-in!)
Reporter | ||
Updated•13 years ago
|
Assignee | ||
Comment 6•13 years ago
|
||
jdaggett, review ping? This is a simple fix for a bad regression....
Comment 7•13 years ago
|
||
Comment on attachment 554556 [details] [diff] [review] patch, v1 - avoid calling SanitizeGlyphRuns repeatedly during textrun construction with multiple scripts Looks fine, but I think you should add a comment noting the details in comment 3 so that we remember what to avoid when restructuring code in the future.
Attachment #554556 -
Flags: review?(jdaggett) → review+
Assignee | ||
Comment 8•13 years ago
|
||
Pushed to inbound, with extra comments: http://hg.mozilla.org/integration/mozilla-inbound/rev/153a1de6cd67
Whiteboard: [inbound]
Comment 9•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/153a1de6cd67
Assignee: nobody → jfkthame
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → mozilla9
You need to log in
before you can comment on or make changes to this bug.
Description
•