Closed
Bug 332497
Opened 19 years ago
Closed 17 years ago
Slow japanese text selection
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: nikolakocicbz, Assigned: pavlov)
References
Details
(Keywords: perf, Whiteboard: cairo)
Attachments
(2 files, 1 obsolete file)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060331 Firefox/1.6a1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060331 Firefox/1.6a1
There is delay when selecting Japanese text and high CPU usage during selection.
Reproducible: Always
Steps to Reproduce:
1. Select text in testcase
Actual Results:
Selecting is slow
Expected Results:
Selecting is normal (like english letters)
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Updated•19 years ago
|
Component: General → GFX: Thebes
Product: Firefox → Core
Version: unspecified → Trunk
Reporter | ||
Updated•19 years ago
|
Summary: Slow down when selecting Japanese text → Slow japanese text selection
Comment 2•19 years ago
|
||
Confirmed.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060331 Firefox/1.6a1 ID:2006033104
Updated•19 years ago
|
Whiteboard: cairo
Comment 3•19 years ago
|
||
Maybe, this is a regression of bug 328940 that is critical problem on some CJK web sites. I have an idea for better fix it, but maybe the patch that is creating now does not fix the performance issue...
Comment 4•19 years ago
|
||
Comment 5•19 years ago
|
||
I think that you cannot reproduce this bug on testcase2.
Comment 6•19 years ago
|
||
Oops. Sorry. Maybe, 3/31 build doesn't have a patch of bug 328940, so it's not a regression. But I think that the performance issue should be fixed...
Nikora and Regis:
Do you have many fonts on your system, right?
Reporter | ||
Comment 7•19 years ago
|
||
It seems that when there is <html lang="ja"> (Testcase2), selection works normaly, but when there is only <html> (Testcase1), selection works slowly.
Comment 8•19 years ago
|
||
I cannot reproduce it, but maybe this happen.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 9•19 years ago
|
||
Both testcases select extremely slow, it is very obvious.
Comment 10•19 years ago
|
||
Slow = 3 seconds with a 1400 Mhrz processor.
Comment 11•19 years ago
|
||
Ria:
Are you setting vaild Japanese font in 'Japanese Default Font'?
If not so, it's not a bug...
Comment 12•19 years ago
|
||
I don't see Japanese fonts. In non-cairo builds I see question marks and I can select them instantly. In cairo builds I see squares and those take very long to select.
Comment 13•19 years ago
|
||
Ria:
Thanks, but it's not a this bug.(generally, it may be same, but I think that it cannot fix...)
Comment 14•19 years ago
|
||
Kimura-san:
Are you having some ideas for this?
Comment 15•19 years ago
|
||
(In reply to comment #6)
> Nikora and Regis:
>
> Do you have many fonts on your system, right?
Yes. Strangly I cannot reproduce today with testcases???
But I can reproduce at http://forums.mozillazine.org/viewtopic.php?p=2181864#2181864
And after visiting url below, testcases are working... I'm lost.
Comment 16•19 years ago
|
||
I can reproduce with the first testcase but not the second (as expected). I have East Asian font support installed so I see correct Japanese characters. (I also have complex script support installed, 310 fonts installed, ClearType enabled, and my system locale set to Japanese, in case those things are relevant.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060407 Firefox/3.0a1 ID:2006040704
Updated•19 years ago
|
QA Contact: general → thebes
Comment 17•19 years ago
|
||
(In reply to comment #11)
> Are you setting vaild Japanese font in 'Japanese Default Font'?
> If not so, it's not a bug...
Even if Ria didn't, it should be reasonably fast. Note that a non-cairo build doesn't have this problem (comment #12) probably because its font/glyph search logic is far better than that of the current trunk. (ref. bug 334299, bug 334296). Comment #16 is another indicator that the font search/fallback logic of the current trunk is not as good as that of Gfx:Win. Even without 'lang' specified, we should perform decently.
Assignee | ||
Comment 18•19 years ago
|
||
i can reproduce. will profile shortly
Assignee | ||
Comment 19•19 years ago
|
||
this patch makes it so that we hold on to the fallback font between script items. we'll still try the other fonts listed first, then try the old fallback font for the previous characters, and then try to find a fallback for the new characters. this speeds up measuring things where we get lots of script items and they all have to use a fallback font.
Comment on attachment 219107 [details] [diff] [review]
fix
Looks fine, as long as:
>- length = NSToCoordRound(len.cx * cairoToPixels);
>+ length = len.cx * cairoToPixels;
is intentional -- is this supposed to be part of this fix?
Attachment #219107 -
Flags: review?(vladimir) → review+
Assignee | ||
Comment 21•19 years ago
|
||
checked in fix
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Backed out pending investigation with 334919; the if statements at the end of the patch are maybe going into an infinite loop? Since the flow is:
if (currentFont == mFallbackFont)
mFallbackFont = FindFallback(...)
if (mFallbackFont && currentFont != mFallbackFont)
currentFont = fallbackfont
goto loop
when we get through the loop again currentFont == fallbackfont, what will FindFallbackFont return? NULL if it can't find another one? or will it create a new fallback font?
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 23•18 years ago
|
||
Comment on attachment 219107 [details] [diff] [review]
fix
this patch was backed out/not checked back in and has been obsoleted.
Attachment #219107 -
Attachment is obsolete: true
Attachment #219107 -
Flags: review+
Assignee | ||
Comment 24•18 years ago
|
||
this bug should be mostly better with the checkin for 340590 -- need to test some more. Another issue with this testcase si that we don't chose the same fonts as we do for testcase2. leaving open for now
Comment 25•18 years ago
|
||
I'm still getting the same behavior as before, selecting the first testcase is slow and selecting the second testcase is fast.
Assignee | ||
Comment 26•17 years ago
|
||
this is really fast for me now.
Status: REOPENED → RESOLVED
Closed: 19 years ago → 17 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•