Closed Bug 30201 Opened 24 years ago Closed 23 years ago
IPlatform Charset should be called by using Service Manager
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
By also fixing 30213, we can reduce a lot of unnecessary file reading.
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.
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).
this is a meta bug. Mark it as futre to make it out of the radar
Target Milestone: M20 → Future
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.