Closed Bug 129166 Opened 23 years ago Closed 17 years ago

nsTextFrame may still call linebreaker too much

Categories

(Core :: Layout, defect, P2)

x86
Linux
defect

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.....
Keywords: nsbeta1, perf
Changing QA contact
QA Contact: petersen → amar
Changing Priority to P2.
Priority: -- → P2
we need more information to tell is this worth it to nsbeta1+ this. When will this happen ?
Whiteboard: [needinfo]
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: nsbeta1nsbeta1-
nsbeta1- per i18n triage
Depends on: line-breaking
No longer depends on: line-breaking
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: 20 years ago
Resolution: --- → WONTFIX
Mass Reassign Please excuse the spam
Assignee: shanjian → nobody
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 → ---
This is interesting in light of what I'm gonna do in bug 255990
Assignee: nobody → jshin1987
Status: REOPENED → NEW
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: 20 years ago17 years ago
Resolution: --- → INVALID
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.