Closed
Bug 13488
Opened 26 years ago
Closed 26 years ago
[perf] Optimize nsDateTimeFormatWin::FormatTMTime()
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
RESOLVED
FIXED
M11
People
(Reporter: waterson, Assigned: nhottanscp)
References
()
Details
If this is not a mailnews performance blocker now, it soon will be. This
function is terribly expensive, mostly because of two calls:
1. The call to the component manager that creates the platform charset (line
167)
2. The call to the platform charset to get the default charset for the locale
(line 171).
RDF creates and holds on to a single date/time formatting object for the entire
time that the app is run. Can we alter the nsDateTimeFormatWin to cache the
default charset, as well? It seems silly to have to go fetch it each time we
want to format a string. It's not going to change, is it?
Performance implications are dire: this function is called once for every date
that is displayed in the mailnews threadpane. It currently accounts for 15% of
the time it takes to construct the RDF content model on a medium (~600message)
sized folder.
| Assignee | ||
Comment 1•26 years ago
|
||
Collation interface nsCollationWin caches those data. I can change date format
interface similar to collation.
It is also possible for the caller to cache nsILocale instead of passing NULL
(which creates application locale every time). Please check how match does this
improve the performance.
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M11
| Assignee | ||
Comment 2•26 years ago
|
||
Accepting, will cache locale data regardless of the nsILocale value (NULL or
not), no client side change required.
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 3•26 years ago
|
||
Checked in the change for three platforms.
Updated•26 years ago
|
QA Contact: teruko → waterson
You need to log in
before you can comment on or make changes to this bug.
Description
•