Closed Bug 574089 Opened 15 years ago Closed 15 years ago

Optimize ::GetInnerHTML (part 1)

Categories

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

x86
All
defect
Not set
normal

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) (deleted) — 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 (deleted) —
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 patch (deleted) — Splinter 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-date (deleted) — Splinter Review
Attached patch additional fix (deleted) — Splinter 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
Depends on: 812621
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: