Closed Bug 574089 Opened 10 years ago Closed 10 years ago

Optimize ::GetInnerHTML (part 1)

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(4 files, 2 obsolete files)

Attached patch patch (obsolete) — Splinter Review
The patch makes us cache encoder and serializer, and also
keep a buffer in the encoder to which the string is appended.
Removes also few addref/release/qi.

I uploaded the patch to tryserver.

There are still other things to optimize, like getting attributes from elements in the serializer.
Attached file a testcase
Simple testcase where the patch helps a lot (time drops to half), but more
is needed (and possible).
Attachment #453455 - Attachment is patch: false
Attachment #453455 - Attachment mime type: text/plain → text/html
Blocks: domperf
Comment on attachment 453454 [details] [diff] [review]
patch

Tryserver hasn't given any results, but I'll
test this locally.
Attachment #453454 - Flags: review?(jst)
Attachment #453454 - Attachment is obsolete: true
Attachment #453454 - Flags: review?(jst)
Attachment #453700 - Flags: review?(jst)
Attached patch patchSplinter Review
Still safer version. Clear the member variables in serializer ::Init.
Assignee: nobody → Olli.Pettay
Attachment #453700 - Attachment is obsolete: true
Attachment #453709 - Flags: review?(jst)
Attachment #453700 - Flags: review?(jst)
Comment on attachment 453709 [details] [diff] [review]
patch

Looks good.
Attachment #453709 - Flags: review?(jst) → review+
Attached patch up-to-dateSplinter Review
Attached patch additional fixSplinter Review
Oops, no need to clear the serializer always.
Attachment #454292 - Attachment is patch: true
Attachment #454292 - Attachment mime type: application/octet-stream → text/plain
http://hg.mozilla.org/mozilla-central/rev/22734aee7378
http://hg.mozilla.org/mozilla-central/rev/32d027dfd9be
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Depends on: 812621
You need to log in before you can comment on or make changes to this bug.