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)

x86
Windows 95
defect

Tracking

()

RESOLVED FIXED
mozilla0.9.6

People

(Reporter: ftang, Assigned: jbetak)

References

Details

(Keywords: perf)

Attachments

(5 files)

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.
reassign to jbetak to work on. mark m0.9.6
Assignee: ftang → jbetak
Keywords: perf
Priority: -- → P3
Target Milestone: --- → mozilla0.9.5
Blocks: 95823
Blocks: 103176
jbetak said we can do it in m0.9.6
Target Milestone: mozilla0.9.5 → mozilla0.9.6
Juraj: would you kindly tell us how much time will be saved by doing this?
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
patch is nearly ready - I'm borrowing from the changes nhotta made to nsMacCharset.cpp
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!
The changes for nsCharsetMenu.cpp, nsCharsetAliasImp.cpp, are those all needed?
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+
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.
Attachment 54511 [details] [diff] does not look like a patch to me.
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+
fix checked in - thanks everyone!
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Changed QA contact to ftang@netscape.com.
QA Contact: andreasb → ftang
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: