Closed Bug 30213 Opened 25 years ago Closed 25 years ago

ns{Win,Mac,UNIX}Charset.cpp should only load nsURLProperties once

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ftang, Assigned: ftang)

References

Details

(Keywords: perf)

When I first create mozilla/intl/uconv/src/ns{Win,Mac,UNIX}Charset.cpp I create the nsURLProperties as local, use it and cache the result in member data , then release it in the local variable and then delete it because I really need to look at it once. When nhotta add new method to the interface GetDefaultCharsetForLocale, he duplicate to code without making the nsURLProperties as a member data and destroy only in the destructor. This cause performance problem. We create a nsURLProperties once every time we call GetDefaultCharsetForLocale, which is a performace hit. We should move the nsURLProperties as an member data and destory only in the destructor. Fix this and ALL the bugs tracek 30201 can reduce a lot of file reading time.
Blocks: 30201
performance issue, add perf as keyword
Keywords: perf
> When nhotta add new method to the interface GetDefaultCharsetForLocale, not me, look as cvsblame, http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/intl/uconv/src/nsWinCharset. cpp
Assignee: nhotta → ftang
I am sorry that I didn't check cvsblame and just use stupid_ftang_blame to blame nhotta. I take it back. It is tague did that. I will take this back and fix it.
Status: NEW → ASSIGNED
Target Milestone: M16
fix and check in for all 3 platforms
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.