Closed Bug 30203 Opened 25 years ago Closed 24 years ago

locale code should called nsIPlatformCharset by using do_GetService

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: ftang, Assigned: nhottanscp)

References

Details

(Keywords: perf)

Attachments

(1 file)

This is a performance problem . Part of 30201. 
nsIPlatformCharset is deisgn to be used as a service/singleton. The following 
places call it by CreateInstance, which cause peroformance problem-
intl/locale/src/mac/nsCollationMac.cpp#181
180     nsCOMPtr <nsIPlatformCharset> platformCharset;
181     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
182                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));

intl/locale/src/mac/nsDateTimeFormatMac.cpp#287
286     nsCOMPtr <nsIPlatformCharset> platformCharset;
287     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
288                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));

intl/locale/src/unix/nsDateTimeFormatUnix.cpp#42
103     nsCOMPtr <nsIPlatformCharset> platformCharset;
104     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
105                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));

intl/locale/src/unix/nsCollationUnix.cpp#41
137     nsCOMPtr <nsIPlatformCharset> platformCharset;
138     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
139                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));

intl/locale/src/windows/nsDateTimeFormatWin.cpp#47
124     nsCOMPtr <nsIPlatformCharset> platformCharset;
125     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
126                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));

intl/locale/src/windows/nsCollationWin.cpp#42
124     nsCOMPtr <nsIPlatformCharset> platformCharset;
125     res = nsComponentManager::CreateInstance(kPlatformCharsetCID, NULL, 
126                                              NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));
Blocks: 30201
performance issue add perf keyword
Keywords: perf
Status: NEW → ASSIGNED
Target Milestone: M15
Summary: locale code should called nsIPlatformCharset by using NS_WITH_SERVICE → locale code should called nsIPlatformCharset by using do_GetService
Attached patch patchSplinter Review
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: