Closed Bug 106792 Opened 24 years ago Closed 22 years ago

remove nsISizeOfHandler

Categories

(Core :: XPCOM, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Whiteboard: [patch])

Attachments

(1 file, 1 obsolete file)

We should remove nsIAtom::SizeOf. Any debugging code that's using it is probably way over-accounting for the atoms anyway, since they're shared. That's why trace-malloc and friends are better.
Status: NEW → ASSIGNED
Can we also get rid of nsISizeOfHandler?
I'd *love* to (since modifying layout data structures always requires spending double the time modifying the SizeOf methods), but attinasi seems to think that people still use it and wants it to stay (at least when I asked back in July), although maybe we should be evangelizing trace-malloc more.
Priority: -- → P1
Target Milestone: --- → Future
OK, changing this bug into being on removing nsISizeOfHandler. trace-malloc is far better (especially since it doesn't contain bias introduced by programmer error in writing SizeOf methods) and requires no code maintainance. Any objections?
Summary: remove nsIAtom::SizeOf → remove nsISizeOfHandler
cc:ing a few more people to see if they care about nsISizeOfHandler. The one objection I heard is from Bernd, who suggested that nsISizeOfHandler is an easier way to see how much a specific change helped. However, I'd think you could easily figure that out (if you really need accurate numbers) using a printf printing the sizeof() of the object and a simple counter (just find the max of a static gInstanceCnt variable) to see how many instances of the object were created at one time. In most cases I'd think approximate numbers for that kind of thing are good enough, though.
I say kill it, Kill it, KILL IT! IMO nsISizeOfHandler is useless since most people (me included) don't take the time to make sure it does the right thing when making changes to classes, and I don't think that'll change...
as I wrote in my email my objection was a recall what Marc said and I have no interest in keeping it.
Attached patch patchSplinter Review
merged
Attachment #110389 - Attachment is obsolete: true
dbaron, do you see any footprint savings?
It's practically all debug code.
Attachment #113300 - Flags: superreview?(jst)
Attachment #113300 - Flags: review?(bzbarsky)
Comment on attachment 113300 [details] [diff] [review] patch Ah, the smell of fresh code removal on a Saturday morning... it warms the heart. ;)
Attachment #113300 - Flags: review?(bzbarsky) → review+
Comment on attachment 113300 [details] [diff] [review] patch <smile size='huge'> sr=jst </smile> :-)
Attachment #113300 - Flags: superreview?(jst) → superreview+
Fix checked in to trunk, 2003-02-22 07:34 PST (with dlldeps.cpp later).
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
I hate to bring this up, but wasn't nsIAtom frozen?
It's not marked frozen, and it needs other changes before it is (it shouldn't be scriptable, since wrapping can break it).
sorry my bad.. I could have SWORN this was frozen..
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: