Closed Bug 106571 Opened 24 years ago Closed 24 years ago

nsXMLElement::mNameSpace wastes space for no good reason

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: jst, Assigned: jst)

Details

(Whiteboard: [HAVE FIX])

Attachments

(1 file)

We waste 4 bytes per nsXMLElement and 4 bytes per DOMSlots in XUL for keeping a pointer to a nsINameSpace structure that we can live just as well without. Patch coming up that removes the member and also nsIXMLContent::[G|S]etContainingNameSpace().
There were four places where we used nsIXMLContent::[G|S]etContainingNamespace(), element.lookupNamespaceURI() and element.lookupNamespacePrefix(), neither of which are performance critical (and the current code is pretty fast, so it's not that much worse), nsXBLService for resolving prefixe to namespace no more than once per binding (hyatt sez the new code is fine perf wise) and once in unused code in nsXULContentUtils, which I removed. Waterson, wanna r= this one? Is it ok to remove the unused code in nsXULContentUtils?
Status: NEW → ASSIGNED
Whiteboard: [HAVE FIX]
Target Milestone: --- → mozilla0.9.6
Yes, remove it! This looks great. r= or sr=waterson
(it == all of it, unused XUL, too.)
Comment on attachment 54971 [details] [diff] [review] Remove mNameSpace from nsXMLElement and from nsXULElement slots, also remove unused methods in nsXULContentUtils sr=waterson
Attachment #54971 - Flags: superreview+
Comment on attachment 54971 [details] [diff] [review] Remove mNameSpace from nsXMLElement and from nsXULElement slots, also remove unused methods in nsXULContentUtils r=dbaron
Attachment #54971 - Flags: review+
Fix checked in, no more mNameSpace!
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
QA Contact: petersen → rakeshmishra
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: