Closed
Bug 129166
Opened 21 years ago
Closed 16 years ago
nsTextFrame may still call linebreaker too much
Categories
(Core :: Layout, defect, P2)
Tracking
()
RESOLVED
FIXED
Future
People
(Reporter: bzbarsky, Assigned: jshin1987)
References
(Blocks 1 open bug)
Details
(Keywords: perf, Whiteboard: [needinfo])
From bug 98118: There is another thing that I am not absolutely sure. In case "aIsBreakable" is true, will we ever suffer in performance in certain situation? If there does exists such a case, "aLineBreaker->Next" will be called again and again with expanding buffer. The following patch should fix the problem if it does happen. +#define MAX_LOOK_BACK_FOR_WORDBREAK 80 if(wordLen > 0) { memcpy((void*)&(aWordBuf[aRunningWordLen]), bp, sizeof(PRUnichar)*wordLen); PRUint32 breakP=0; PRBool needMore=PR_TRUE; + PRUint32 startPos = 0; + if (aRunningWordLen > MAX_LOOK_BACK_FOR_WORDBREAK) + startPos = aRunningWordLen - MAX_LOOK_BACK_FOR_WORDBREAK; nsresult lres = aLineBreaker->Next(aWordBuf, aRunningWordLen+wordLen, - 0, &breakP, &needMore); + startPos, &breakP, &needMore); if(NS_SUCCEEDED(lres)) ------------------------------------------------------------------ I'll try to come up with a testcase triggering this.....
Updated•21 years ago
|
Comment 3•21 years ago
|
||
we need more information to tell is this worth it to nsbeta1+ this. When will this happen ?
Whiteboard: [needinfo]
Updated•21 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Updated•21 years ago
|
Comment 4•21 years ago
|
||
nsbeta1- per i18n triage
Assignee | ||
Updated•20 years ago
|
Depends on: line-breaking
Assignee | ||
Updated•20 years ago
|
Blocks: line-breaking
No longer depends on: line-breaking
Comment 5•18 years ago
|
||
shanjian is no longer working on mozilla for 2 years and these bugs are still here. Mark them won't fix. If you want to reopen it, find a good owner first.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → WONTFIX
Comment 7•18 years ago
|
||
Mass Re-opening Bugs Frank Tang Closed on Wensday March 02 for no reason, all the spam is his fault feel free to tar and feather him
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Assignee | ||
Comment 8•18 years ago
|
||
This is interesting in light of what I'm gonna do in bug 255990
Assignee: nobody → jshin1987
Status: REOPENED → NEW
Comment 9•16 years ago
|
||
Closing this as the patch doesn't apply anymore to the new textframe. The new textframe should not ahve the problem : http://weblogs.mozillazine.org/roc/archives/2007/07/status_3.html "the new-textframe infrastructure caches the results of line-break analysis in textruns."
Status: NEW → RESOLVED
Closed: 18 years ago → 16 years ago
Resolution: --- → INVALID
![]() |
Reporter | |
Comment 10•16 years ago
|
||
Actually, this is just fixed by the new textframe.
Resolution: INVALID → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•