Closed Bug 222342 Opened 22 years ago Closed 22 years ago

Speed up txStylesheet::isStripSpaceAllowed

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

We can make txStylesheet::isStripSpaceAllowed faster for the (vastly common) case when there are no xsl:strip-space or xsl:preserve-space elements in the stylesheet. Right now txStylesheet::isStripSpaceAllowed has a fairly suboptimal route when called on a textnode, including getting the nodevalue and checking if the its whitespace data. patch comming up
Attached patch patch to fix (obsolete) — Splinter Review
This simply earlyreturns if we have no stripspace rules
Attachment #133363 - Flags: superreview?(peterv)
Attachment #133363 - Flags: review?(axel)
btw, I should mention that this patch was made possible by the landing of bug 199613, since before that we relied on txStylesheet::isStripSpaceAllowed to strip textnodes in the root of the document.
Status: NEW → ASSIGNED
Comment on attachment 133363 [details] [diff] [review] patch to fix oops, what happened? ;-)
Attachment #133363 - Flags: review?(axel) → review+
Attached patch patch v2Splinter Review
this makes us return false for document-nodes. It won't make a difference since documents will never contain any textnodes, but this way we'll save the nodetype check in the code for //. http://lxr.mozilla.org/mozilla/source/extensions/transformiix/source/xpath/PathExpr.cpp#187
Attachment #133430 - Flags: superreview?(peterv)
Attachment #133430 - Flags: review?(axel)
Attachment #133430 - Flags: review?(axel) → review+
I suppose you'll hold off until bug 56764 is fixed?
Attachment #133430 - Flags: superreview?(peterv) → superreview+
checked in, thanks for reviews
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: