nsBindingManager uses PLDHash where maybe it should use nsInterfaceHashtable

RESOLVED WONTFIX

Status

()

P1
normal
RESOLVED WONTFIX
15 years ago
15 years ago

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Tracking

Trunk
mozilla1.7alpha
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

15 years ago
See the 120 or so lines of code starting at
http://lxr.mozilla.org/seamonkey/source/content/xbl/﷒0﷓

bsmedberg, do you think that changing the relevant hashtables to
nsInterfaceHashtable will be a win in either speed or codesize?  It should
certainly be a win in code clarity...

In any case, this depends on bug 224765, since I'm touching code in that general
area in that patch...

Comment 1

15 years ago
converting from doublehashtable is a good thing... it's deprecated and not
really being maintained. This will almost certainly help codesize a bit, perf
will probably stay flat.

--BDS
(Assignee)

Comment 2

15 years ago
Note that the nsDoubleHashtable instances are being removed in bug 224765.  This
bug is about the remaining raw PLDHashTable instances
(http://lxr.mozilla.org/seamonkey/source/content/xbl/﷒0﷓).

Comment 3

15 years ago
oh, well then... I think if it works and there aren't obvious problems, don't
mess with it... raw pldhash code is going to be a little bit smaller than
template code.
(Assignee)

Comment 4

15 years ago
Well, this code has a bunch of methods to make the PLDHash code more
palatable... if the codesize changes are not going to be too big, I would like
to aim at reducing complexity.  So as long as it's same ballpark, I'll whip up a
patch and see what effect it has.
(Assignee)

Updated

15 years ago
Priority: -- → P1
Target Milestone: --- → mozilla1.7alpha
(Assignee)

Comment 5

15 years ago
OK, I just tried this.  The codesize difference is about 20k unstripped, 12k
stripped (with the template code bigger).  Looks like each template
instantiation is about 5k, which adds up... :(

If I make all the hashtables nsISupports -> nsISupports, then I get something
more like 4k increase, but at that point it's not worth it -- I have to cast and
shit anyway.

I guess there's not much we can do to shrink the size of nsInterfaceHashtable,
right?

Wontfixing, since the extra 12k really aren't worth the (rather minimal, really)
code clarity improvement.
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.