Closed
Bug 346641
Opened 19 years ago
Closed 18 years ago
Error console performance
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jwatt, Unassigned)
References
Details
(Keywords: perf, Whiteboard: cairo)
Boris sent an email to mozilla.dev.performance regarding the unusable state of the Error Console on cairo builds. The text is copied below:
----------
So I discovered today that on trunk the error console takes _forever_ to open. To be precise, starting with a blank error console, then loading the following HTML:
<script>
for (var i = 0; i < 20; ++i) {
setTimeout("throw 'This is a test of the emergency broadcast system; only a test and all that dudes'", 0);
}
</script>
then opening the error console, I see it take 15-20 seconds for the window to appear.
A profile shows that we're spending a _lot_ of time in reflow (pretty much all the time is in InitialReflow()) and of the reflow time about 90% is spent under nsTextFrame::MeasureText. Almost all of that is under gfxPangoTextRun::Measure, gfxPangoTextRun::~gfxPangoTextRun, and gfxPangoFontGroup::MakeTextRun (with these last two accoundting for about 15% of the MeasureText time, with the rest under Measure). The time under Measure is almost all gfxPangoTextRun::EnsurePangoLayout.
Of particular interest is pango_context_get_base_dir, which takes up about 25% of total layout time. This seems to be doing a lot of mallocing, removing from font maps, creating new script iters, bsearch, hashtable lookups, utf8 to ucs4 conversion, etc...
I see this in both Firefox and Seamonkey cairo builds.
For comparison, the non-cairo builds open up the Error Console in about 4 seconds (which is _still_ ridiculous) when using the same testcase. So there is probably also the problem of us doing a _lot_ of reflow here for some reason. And of cairo making that about 5x slower... :(
I'd be happy to mail the profile to anyone interested in it.
Also of interest, a reflow branch non-cairo build opens the console about twice as fast as a trunk non-cairo build. I don't have a reflow branch cairo build on hand to test with, though.
-Boris
Comment 1•19 years ago
|
||
Blocking the cross-platform cairo metabug for now. If the problem is only on Linux (unlikely, TBH) the correct blocking bug is bug 334720.
Blocks: 334736
Whiteboard: cairo
Comment 2•19 years ago
|
||
(In reply to comment #1)
> Blocking the cross-platform cairo metabug for now. If the problem is only on
> Linux (unlikely, TBH) the correct blocking bug is bug 334720.
seems likely to me, given:
> Almost all of that is under
> gfxPangoTextRun::Measure, gfxPangoTextRun::~gfxPangoTextRun, and
> gfxPangoFontGroup::MakeTextRun
Which is only used on Linux (well, the rest of X11 too, and BeOS, and maybe OS/2?)
Blocks: 334719
Keywords: perf
OS: Windows XP → Linux
Comment 3•18 years ago
|
||
Is this still an issue? At least on Windows, error console comes up after only a short delay.
![]() |
||
Comment 4•18 years ago
|
||
This does seem to be OK now with new-textframe and the reflow branch...
> At least on Windows,
This was a Linux-specific bug.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
Comment 5•18 years ago
|
||
I came upon the bug when looking at bug 334719, so that's why I mentioned my platform :-)
You need to log in
before you can comment on or make changes to this bug.
Description
•