Closed
Bug 28841
Opened 26 years ago
Closed 26 years ago
space-minimize nsStr structure
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: waterson, Assigned: rickg)
Details
(Keywords: perf)
Several alternatives:
1. Just pack bits and use less space. (jevering changed lengths to 16 bits,
etc., and was able to reduce the app's core size by 200Kb, or 1%).
2. Use a more extravagant packing scheme, which would make nsStr just point to a
buffer, the buffer which would contain the fields as a prefix.
This work should be accompanied by demonstratable space results.
![]() |
||
Comment 1•26 years ago
|
||
Somebody explain to me why we need the mCharsize field at all. The 2 subclasses
of nsStr, nsString and nsCString, know the charsize implicitly, don't they?
![]() |
||
Comment 2•26 years ago
|
||
Once this is done, I'll do the work to roll nsXPIDL*String into ns*String
Filing a new bug now
![]() |
||
Comment 5•26 years ago
|
||
Chris is instrumenting |nsString| to help determine which alternative will yield
the greatest gains. See
<http://bugzilla.mozilla.org/show_bug.cgi?id=28842>
A good measure might be to add (for profiling only, of course) a time field to
the string structure, and log how _long_ a string exists at a certain size. That
way we could tell the difference between having lots of empty strings and having
lots of strings that just happen to start empty but don't really spend much time
in that state.
Alec, with respect to |getter_Copies|, |getter_CopiesWithCharset|, et al, I
appreciate the help :-) The notion of combining |nsXPIDL[C]String|s
functionality directly into |nsString|, and eliminating the other classes is a
major value pushing for the second alternative above (since it gives us more
flexibility with the length, and definitely will find the places where people are
using it in ways that interfere with this plan).
Status: NEW → ASSIGNED
Target Milestone: M15
![]() |
||
Comment 6•26 years ago
|
||
cc'ing jevering at his request. jevering also reports that rickg is examining
these issues as well.
I'm taking this from you scott; I agree with the analysis, and will save you the
trouble, so that you can focus on bigger issues.
Assignee: scc → rickg
Status: ASSIGNED → NEW
![]() |
||
Comment 8•26 years ago
|
||
Yeah, when this bug was first filed I talked to jevering about whether I should
re-assign it to you. His argument was similar, but in the opposite direction.
He wanted me to keep the bug, since you necessarily are focusing on the bigger
issues of management, directorship, and the PDT team. I'll keep the bug, thanks.
Assignee: rickg → scc
![]() |
||
Updated•26 years ago
|
Status: NEW → ASSIGNED
![]() |
||
Comment 9•26 years ago
|
||
It looks like you are doing this work, rick, as part of the |StringValue| stuff.
So you should own the bug in spite of earlier comments. Sorry, and thank you.
Assignee: scc → rickg
Status: ASSIGNED → NEW
![]() |
Assignee | |
Comment 10•26 years ago
|
||
Ok -- so nsStr is going away altogether, and the new string is alrady compressed
(to what I think is the min size). I'm closing this as a result of that work,
already in progress, as it refers to a design goal that (I think) I'm meeting in
the new approach.
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
![]() |
||
Comment 11•26 years ago
|
||
Marking Verified for his bug per rickg comments.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•