Closed
Bug 97174
Opened 24 years ago
Closed 23 years ago
startup perf- remove the need of loading of wincharset.properties files at startup time to speed up
Categories
(Core :: Internationalization, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: ftang, Assigned: jbetak)
References
Details
(Keywords: perf)
Attachments
(5 files)
12.00 KB,
patch
|
Details | Diff | Splinter Review | |
4.49 KB,
patch
|
nhottanscp
:
review+
|
Details | Diff | Splinter Review |
139.01 KB,
patch
|
Details | Diff | Splinter Review | |
4.52 KB,
patch
|
sfraser_bugs
:
superreview+
|
Details | Diff | Splinter Review |
12.29 KB,
patch
|
Details | Diff | Splinter Review |
we currently load wincharset.properties at startup time, we should find a way to
remove the need of loading it at startup time to speed up startup performance
we could
1. build in common used pair in the cpp code, and/or
2. cache the resolved result in registry.
Reporter | ||
Comment 1•23 years ago
|
||
reassign to jbetak to work on. mark m0.9.6
Reporter | ||
Comment 2•23 years ago
|
||
jbetak said we can do it in m0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Comment 3•23 years ago
|
||
Juraj: would you kindly tell us how much time will be saved by doing this?
Assignee | ||
Comment 4•23 years ago
|
||
accepting.
bstell:
my measurements using the built-in NS_TIMELINE timer show that this would save
~31 ms, which ~0.6% of my local startup time. By doing this with say 10 files,
we could potentially save 6% of startup time and get an honorable mention in
the next release.
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•23 years ago
|
||
patch is nearly ready - I'm borrowing from the changes nhotta made to
nsMacCharset.cpp
Assignee | ||
Comment 6•23 years ago
|
||
Assignee | ||
Comment 7•23 years ago
|
||
nhotta or ftang - could you please help with a review. I just quickly put this
together, so there might be things that I missed. Thanks!
Comment 8•23 years ago
|
||
The changes for nsCharsetMenu.cpp, nsCharsetAliasImp.cpp, are those all needed?
Assignee | ||
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
Comment on attachment 54319 [details] [diff] [review]
removed overlap with another patch - thanks nhotta!
Please check the result of InitInfo() in MapToCharset().
r=nhotta
Attachment #54319 -
Flags: review+
Assignee | ||
Comment 11•23 years ago
|
||
Assignee | ||
Comment 12•23 years ago
|
||
sfraser:
this is analogous to bug 97172 which pertains to maccharset.properties and I
was wondering whether you'd feel comfortable with super reviewing this patch as
well.
Comment 13•23 years ago
|
||
Attachment 54511 [details] [diff] does not look like a patch to me.
Assignee | ||
Comment 14•23 years ago
|
||
Comment 15•23 years ago
|
||
Comment on attachment 54516 [details] [diff] [review]
oops - I apologize, this should be the most recent revision!
> private:
> nsString mCharset;
>+ nsresult InitInfo();
>+ nsresult MapToCharset(nsString& inANSICodePage, nsString& outCharset);
Minor stylistic comment; I don't like to see private members and methods mixed
up like this. It seems cleaner to have:
private:
nsresult InitInfo();
nsresult MapToCharset(nsString& inANSICodePage, nsString& outCharset);
private:
nsString mCharset;
>+ nsAutoString propertyURL(NS_LITERAL_STRING("resource:/res/wincharset.properties"));
>+ nsURLProperties *info = new nsURLProperties( propertyURL );
Can you use an NS_LITERAL_STRING here?
>+ if(inANSICodePage.Equals(NS_LITERAL_STRING("acp.1252"))) {
Non-standard spacing ("if (").
>+ nsString charset;
> nsString localeAsNSString(localeName);
Would nsAutoStrings be better?
Fix those and sr=sfraser
Attachment #54516 -
Flags: superreview+
Assignee | ||
Comment 16•23 years ago
|
||
Assignee | ||
Comment 17•23 years ago
|
||
fix checked in - thanks everyone!
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•