Closed Bug 104988 Opened 23 years ago Closed 4 months ago

cache string bundles in certain callers to improve message compose performance

Categories

(MailNews Core :: Composition, defect)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: sspitzer, Unassigned)

References

Details

(Keywords: perf)

cache string bundles in certain callers to improve msg compose performance

while working on msg compose performance, I noticed that we pay a significant
hit if our call to create a string bundle results in a cache miss.

building a string bundle isn't cheap.

another alernative is to never evict certain (or any) string bundles from the
bundle cache.

for example, evicting necko.properties is bad, since we know we are going to
reload it.

on the subject of string bundles, composeMsgs.properties is the biggest one
we've got in mailnews.  if that gets evicted, and we need to load it again for
the compose window, we pay the price.

I'm going to break it apart, so that the strings we use on new compose window
are in one properties file, and the rest, infrequently used strings, are in
another bundle.
ya know, we could always just increase the size of the string bundle cache. I
just arbitrarily hardcoded it to 10 bundles. there's a #define
MAX_CACHED_BUNDLES that can be changed very easily. (No, I didn't put it in a
pref - long story but basically string bundles can't use prefs until I clean up
some other dependencies)

Try a few values...see if you can find a 'sweet spot'
when I get back to this, I'll try to find a sweet spot.

I'll also look into breaking up composeMsgs.properties.
Status: NEW → ASSIGNED
QA Contact: sheelar → stephend
Keywords: nsbeta1
alecf recently bumped up the # from 10 to 15, because that's how many bundles 
we create at startup.

I'll keep this bug open, because tracks string bundle abuses in mailnews.
OS: Windows 2000 → All
Hardware: PC → All
I'm minusing this because it sounds like Alec's fix may have solved the worst
part of the problem for us.  If it's still important for us to make changes, let
me know.
Keywords: nsbeta1nsbeta1-
Target Milestone: --- → mozilla1.2
Product: MailNews → Core
sorry for the spam.  making bugzilla reflect reality as I'm not working on these bugs.  filter on FOOBARCHEESE to remove these in bulk.
Assignee: sspitzer → nobody
Status: ASSIGNED → NEW
Filter on "Nobody_NScomTLD_20080620"
QA Contact: stephend → composition
Product: Core → MailNews Core
Target Milestone: mozilla1.2alpha → ---
Severity: normal → minor
Is this bug still relevant? Is the caching still done in the way it was when this bug was filed? Is the composition still hit by this in any significant way?
My would doubt it has any relevance.
Severity: minor → S4
Summary: cache string bundles in certain callers to improve msg compose performance → cache string bundles in certain callers to improve message compose performance

Let's close this. Should move to Fluent anyway.

Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.