Closed
Bug 46712
Opened 24 years ago
Closed 24 years ago
string bundle memory flushing
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: warrensomebody, Assigned: alecf)
Details
(Keywords: memory-footprint, Whiteboard: [nsbeta3+])
Attachments
(2 files)
4.08 KB,
patch
|
Details | Diff | Splinter Review | |
4.08 KB,
patch
|
Details | Diff | Splinter Review |
From the footprint meeting 7/26/00:
9) String bundles
Description: StringKeys used by string bundle hashtables have showed up fairly
high on the bloatblame list. Each StringKey
holds an AutoString which seems wasteful for the keys in the hashtable itself
(the AutoStrings are useful during lookup when the
key is stack allocated). We need to reduce the size of StringKeys. Also, could
string bundles be arena allocated?
Module owner: ?
Task owner: warren@netscape.com
Status: Warren to look into alternatives for StringKeys and string bundle
allocation.
[The hashtable/nsStringKey issue is bug 46711]
Maybe string bundles can utilize arenas to save space/time.
Reporter | ||
Updated•24 years ago
|
Reporter | ||
Updated•24 years ago
|
Whiteboard: [nsbeta3+]
Assignee | ||
Comment 1•24 years ago
|
||
I use an arena for the string bundle cache, though not for the string bundle
itself...
In order to fix bug 46491, I needed to expose a flushBundleCache() on the string
bundle service, so that chrome could explicitly flush the string bundle cache
when the locale changes.
I'm almost done with this in my tree..
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
this patch removes the dependancy on chrome, and adds the flush API.
Now going to fix chrome so that it calls this.
I'm going to reassign to me since I'm fixing two bugs at the same time - this
one and the dependancy issue.
warren/tao - care to review this so I can checkin this first patch?
Assignee: warren → alecf
Reporter | ||
Comment 5•24 years ago
|
||
Hiding comments from me?... :-)
Anyway, there are 2 issues here:
1. We should remove the ConvertChromeURL stuff from string bundles. Once we do
that, the chrome protocol will need to call your flushBundleCache routine when
it switches locales.
2. In low-memory situations, we want to have a memory flusher registered with
nsIMemory that calls flushBundleCache. Can you add that while you're at it?
Thanks.
Patch looks good.
Assignee | ||
Comment 6•24 years ago
|
||
Assignee | ||
Comment 7•24 years ago
|
||
Will do. Patch attached which does that too..
Reporter | ||
Comment 8•24 years ago
|
||
I don't see nsIMemoryPressureObserver in the patch.
Assignee | ||
Comment 9•24 years ago
|
||
ugh, I must have attached the same patch twice
Assignee | ||
Comment 10•24 years ago
|
||
ok, fix is in.. string bundles are now flushed
- when nsMemory tells us to free up memory
- when the locale switches
Assignee | ||
Comment 11•24 years ago
|
||
oops, actually marking fixed
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•