Closed Bug 30201 Opened 25 years ago Closed 24 years ago

[track]nsIPlatformCharset should be called by using Service Manager

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: ftang, Assigned: ftang)

References

Details

(Keywords: meta, perf)

this is a performnace problem.
nsIPlatformCharset is design to be an singleton service object. Create it 
multiple time is a performance problem. Somhow currently many places called by 
CreateInstance, which cause multiple copy of it get create. We should replace 
them by NS_WITH_SERVICE
There are many places. I use this bug as tracking bug
Status: NEW → ASSIGNED
Depends on: 30203
Depends on: 30204
Depends on: 30205
Depends on: 30209
Depends on: 30210
Depends on: 30212
Keywords: meta, perf
By also fixing 30213, we can reduce a lot of unnecessary file reading.
Depends on: 30213
Summary: nsIPlatformCharset should be called by using Service Manager → [track]nsIPlatformCharset should be called by using Service Manager
Target Milestone: M15
Frank, how much performance improvement do we get from all this. When we looked 
only two instances were being created on startup adding to .14secs out of 19sec 
startup right ?

I can check my quantify data if you tell me something to look for and post the 
timings here. Then we can decide to fix this if we think the gain is high.
Blocks: 7251
I have changed most of the places to use the service manager in my local tree.
And saw most of the class store the result charset into static variable, so it 
won't call the interface as many times as originally expected.
nsFileSpec does not cache the result but the code is executed in limited 
condition (i.e., not used by most of the nsFileSpec instance).
Blocks: 31758
Target Milestone: M15 → M20
QA Contact: teruko → ftang
this is a meta bug. Mark it as futre to make it out of the radar
Target Milestone: M20 → Future
It's fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
No longer blocks: 7251
You need to log in before you can comment on or make changes to this bug.