Closed Bug 200330 Opened 22 years ago Closed 22 years ago

more const-lovin in htmlparser

Categories

(Core :: DOM: HTML Parser, defect, P2)

PowerPC
macOS
defect

Tracking

()

RESOLVED FIXED
mozilla1.4beta

People

(Reporter: alecf, Assigned: alecf)

Details

(Keywords: memory-footprint, Whiteboard: fix in hand)

Attachments

(1 file)

wow, I found a ton more stuff that can be const. Here's what I did to find the const stuff and make tracking it down very easy: nm -s __DATA __data -j libhtmlpars.so | c++filt > const-data grep -n -w -f const-data *.h *.cpp this basically gives you every declaration (and use) of all the non-const global symbols. I expect to be able to apply this to other modules. anyway, patch forthcoming.
after this, there are only 3 non-const global symbols worth hacking - at runtime we malloc 3 tables and dump data into them. Eventually we can probably clean them up too.
Comment on attachment 119194 [details] [diff] [review] const the heck out of the library Ya, I think I hit most of those in one of my patches.
Attachment #119194 - Flags: superreview+
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: fix in hand
Target Milestone: --- → mozilla1.4beta
Comment on attachment 119194 [details] [diff] [review] const the heck out of the library r=moi
Attachment #119194 - Flags: review+
libhtmlpars.so decrease by net of 576B! libhtmlpars.so Total: -576 (+8405/-8981) Code: +32 (+652/-620) Data: -608 (+7753/-8361) +4384 (+7689/-3305) R (DATA) +4384 (+7689/-3305) UNDEF:libhtmlpars.so:R +1458 kUnknownKids +953 kWhitespace +732 PA_HackTable +88 gBodyKids +82 gExcludableParents +64 gAddressKids +64 gAreaParent +64 gBodyAutoClose +64 gButtonKids +64 gCaptionAutoClose +64 gColParents +64 gColgroupKids +64 gContainsOpts +64 gContainsParam +64 gContainsText +64 gDLKids +64 gDLRootTags +64 gDTCloseTags +64 gDTKids +64 gDivAutoClose +64 gFieldsetKids +64 gFontKids +64 gFormKids +64 gFramesetKids +64 gFramesetParents +64 gHRAutoClose +64 gHTMLRootTags +64 gHeadKids +64 gHeadingTags +64 gHtmlKids +64 gInBody +64 gInDL +64 gInFieldset +64 gInForm +64 gInFrameset +64 gInHTML +64 gInHead +64 gInNoframes +64 gInP +64 gInTable +64 gLIAutoClose +64 gLIKids +64 gLIRootTags +64 gLabelKids +64 gMapKids +64 gNoframeRoot +64 gOLAutoClose +64 gOLRootTags +64 gOptgroupParents +64 gPAutoClose +64 gParamParents +64 gPreKids +64 gRootTags +64 gTBodyAutoClose +64 gTBodyKids +64 gTDCloseTags +64 gTDRootTags +64 gTRCloseTags +64 gTREndParents +64 gTRKids +64 gTRParents +64 gTableCloseTags +64 gTableElemKids +64 gTableKids +64 gTableRootTags +64 gULAutoClose +64 gULCloseTags +64 gULKids +64 gUnknownKids +40 kButtonExcludeKids +40 kPreExcludeKids +36 kMapKids +20 gBodyExcludeKids +20 sHTMLTagUnicodeName_xmp +16 kAutoCloseDD +12 kDLKids +12 kLIExcludeKids +12 kSelectKids +8 kBlockQuoteKids +8 kColgroupKids +8 kDirKids +8 kFieldsetKids +8 kFormKids +8 kFramesetKids +8 kObjectKids +8 kOptionGroupKids +8 kTBodyKids -72 kCharsetConverterManagerCID -152 kEventQueueServiceCID -664 kAttributeTerminalChars -949 newline.2104 -1468 kClassIID +32 (+652/-620) T (CODE) +32 (+652/-620) UNDEF:libhtmlpars.so:T +404 HasCloseablePeerAboveRoot(TagList const &, nsDTDContext &, nsHTMLTag, int) +200 Initialize(nsHTMLTag, nsHTMLTag, nsHTMLTag, TagList const *, TagList const *, TagList const *, TagList const *, TagList const *, TagList const *, int, int, int, int, unsigned int, TagList const *, TagList const *, nsHTMLTag) +48 InitializeElementTable(void) -8 nsHTMLElement::IsChildOfHead(nsHTMLTag, int &) -8 atexit -200 Initialize(nsHTMLTag, nsHTMLTag, nsHTMLTag, TagList *, TagList *, TagList *, TagList *, TagList *, TagList *, int, int, int, int, unsigned int, TagList *, TagList *, nsHTMLTag) -404 HasCloseablePeerAboveRoot(TagList &, nsDTDContext &, nsHTMLTag, int) -4992 (+64/-5056) D (DATA) -4992 (+64/-5056) UNDEF:libhtmlpars.so:D +40 gElementTable +12 gTableElements.1776 +8 DelTokenCount +4 kDelimiter.2114 -4 kWhitespace -4 kUnorderedStringError -4 kBodyId -4 kBadHTMLText -8 kTBodyKids -8 kOptionGroupKids -8 kObjectKids -8 kFramesetKids -8 kFormKids -8 kFieldsetKids -8 kDirKids -8 kColgroupKids -8 kBlockQuoteKids -12 kSelectKids -12 kLIExcludeKids -12 kDLKids -12 gNoXTags.2497 -20 gBodyExcludeKids -28 kBodyClassWrap -36 kMapKids -36 kAutoCloseDD -40 kPreExcludeKids -40 kButtonExcludeKids -44 kUnknownKids -44 gCaptionExcludableParents -64 gUnknownKids -64 gULKids -64 gULCloseTags -64 gULAutoClose -64 gTableRootTags -64 gTableKids -64 gTableElemKids -64 gTableCloseTags -64 gTRParents -64 gTRKids -64 gTREndParents -64 gTRCloseTags -64 gTDRootTags -64 gTDCloseTags -64 gTBodyKids -64 gTBodyAutoClose -64 gRootTags -64 gPreKids -64 gParamParents -64 gPAutoClose -64 gOptgroupParents -64 gOLRootTags -64 gOLAutoClose -64 gNoframeRoot -64 gMapKids -64 gLegendParents -64 gLabelKids -64 gLIRootTags -64 gLIKids -64 gLIAutoClose -64 gInTable -64 gInTR -64 gInP -64 gInNoframes -64 gInHead -64 gInHTML -64 gInFrameset -64 gInForm -64 gInFieldset -64 gInDL -64 gInBody -64 gInAddress -64 gHtmlKids -64 gHeadingTags -64 gHeadKids -64 gHTMLRootTags -64 gHRAutoClose -64 gFramesetParents -64 gFramesetKids -64 gFormKids -64 gFontKids -64 gFieldsetKids -64 gExcludableParents -64 gDivAutoClose -64 gDTKids -64 gDTCloseTags -64 gDLRootTags -64 gDLKids -64 gContainsText -64 gContainsParam -64 gContainsOpts -64 gColgroupKids -64 gColParents -64 gCaptionAutoClose -64 gButtonKids -64 gBodyParents -64 gBodyAutoClose -64 gAreaParent -64 gAddressKids -64 gAParents -64 PA_HackTable -88 gBodyKids
the real bonus is that over 4k of data went into the read-only segment of the dll.
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

Creator:
Created:
Updated:
Size: