Closed
Bug 466578
Opened 16 years ago
Closed 16 years ago
Speed up XBL parsing
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9.1b3
People
(Reporter: taras.mozilla, Assigned: taras.mozilla)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 2 obsolete files)
808 bytes,
patch
|
bzbarsky
:
review+
bzbarsky
:
superreview+
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
This should shave off another 100-200ms off startup time. However, i can't conclusively show that startup is faster due it varying by +-250ms here.
To get the number I timed the runtime of individual functions loading xbl files and those show a conclusive speed up. Larger xml files parse 2x faster now with no measurable slowdown on smaller ones.
Assignee | ||
Comment 1•16 years ago
|
||
Assignee: nobody → tglek
Assignee | ||
Comment 2•16 years ago
|
||
Attachment #349879 -
Attachment is obsolete: true
Assignee | ||
Comment 3•16 years ago
|
||
Just to give a bigger picture. Without my changes these files parse in about 610ms.
Updated•16 years ago
|
Attachment #349881 -
Attachment description: single read9fixed typo) → single read (fixed typo)
Updated•16 years ago
|
Component: General → DOM
Product: Fennec → Core
QA Contact: general → general
Assignee | ||
Comment 4•16 years ago
|
||
Comment on attachment 349881 [details] [diff] [review]
single read (fixed typo)
my only concern here is the arbitrary maximum size
Attachment #349881 -
Flags: review?(bzbarsky)
Comment 5•16 years ago
|
||
So this just helps because we thrash around less in networking-parser-networking? Or something else? That is, what made you make this change?
The change itself looks ok, with PR_UINT16_MAX used for the magic constant.
Are there other places where we could get similar wins? I guess XUL is fastloaded, so not an issue there....
Assignee | ||
Comment 6•16 years ago
|
||
Actually IO and system calls in general on n810 are really slow. So this might be caused by that. Either that or each call into the parser is expensive, I'm not sure. I tried this from past experience indicating that parsing things in a big chunk is quicker than smaller incremental parses.
Comment 7•16 years ago
|
||
Perhaps we should consider increasing buffer sizes throughout necko from 4k to something bigger (16k?). File followup bugs as needed?
Post a patch with PR_UINT16_MAX?
Assignee | ||
Comment 8•16 years ago
|
||
So I poked around some more. There is a superficially similar pattern in the CSSLoaderImpl::LoadSheet (according to oprofile callgraph) that's eating a few ms of start time. Fortunately css is less bloated than XML and increasing the buffers willy-nilly is either puny gain or a small performance loss.
So increasing buffers everywhere seems like it would hurt more unless those buffers will get used.
Attachment #349881 -
Attachment is obsolete: true
Attachment #350032 -
Flags: review?(bzbarsky)
Attachment #349881 -
Flags: review?(bzbarsky)
Comment 9•16 years ago
|
||
Comment on attachment 350032 [details] [diff] [review]
single read(added constant)
[Checkin: Comment 11 & 12]
OK, let's do it.
Attachment #350032 -
Flags: superreview+
Attachment #350032 -
Flags: review?(bzbarsky)
Attachment #350032 -
Flags: review+
Assignee | ||
Updated•16 years ago
|
Attachment #350032 -
Flags: approval1.9.1?
Updated•16 years ago
|
Attachment #350032 -
Flags: approval1.9.1? → approval1.9.1+
Comment 10•16 years ago
|
||
Comment on attachment 350032 [details] [diff] [review]
single read(added constant)
[Checkin: Comment 11 & 12]
a191=beltzner
Assignee | ||
Updated•16 years ago
|
Keywords: checkin-needed
Pushed fc47c2c3e3c1
I guess this is still checkin-needed for 1.9.1
Keywords: checkin-needed
Comment 12•16 years ago
|
||
Comment on attachment 350032 [details] [diff] [review]
single read(added constant)
[Checkin: Comment 11 & 12]
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/bed2112e43b6
Attachment #350032 -
Attachment description: single read(added constant) → single read(added constant)
[Checkin: Comment 11 & 12]
Updated•16 years ago
|
Keywords: checkin-needed → fixed1.9.1
Target Milestone: --- → mozilla1.9.1b3
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•