Closed Bug 30209 Opened 25 years ago Closed 24 years ago

widget code should called nsIPlatformCharset by using do_GetService

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: ftang, Assigned: nhottanscp)

References

Details

(Keywords: perf, Whiteboard: patch ready)

Attachments

(1 file)

This is a performance problem . Part of 30201. 
nsIPlatformCharset is deisgned to be used as a service/singleton. The following 
places call it by CreateInstance, which cause peroformance problem-

cvsblame show nhotta
mozilla/widget/src/gtk/nsFileWidget.cpp
416 nhotta   1.37   // Create an unicode converter for file system charset
417                 if (nsnull == gUnicodeEncoder) {
418                     nsAutoString localeCharset;
419               
420                     nsCOMPtr <nsIPlatformCharset> platformCharset;
421                     rv = 
nsComponentManager::CreateInstance(NS_PLATFORMCHARSET_PROGID, nsnull, 
422                                                             
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));
423 


mozilla/widget/src/mac/nsMacControl.cpp
596                       nsCOMPtr <nsIPlatformCharset> platformCharset;
597                       rv = 
nsComponentManager::CreateInstance(NS_PLATFORMCHARSET_PROGID, nsnull, 
598                                                               
NS_GET_IID(nsIPlatformCharset), getter_AddRefs(platformCharset));


widget/src/windows/nsFileWidget.cpp#381
380     nsCOMPtr <nsIPlatformCharset> platformCharset;
381     rv = nsComponentManager::CreateInstance(NS_PLATFORMCHARSET_PROGID, 
nsnull, 
382                                             NS_GET_IID(nsIPlatformCharset), 
getter_AddRefs(platformCharset));
Blocks: 30201
performance issue add perf keyword
Keywords: perf
Status: NEW → ASSIGNED
Target Milestone: M15
Summary: widget code should called nsIPlatformCharset by using NS_WITH_SERVICE → widget code should called nsIPlatformCharset by using do_GetService
Attached patch patchSplinter Review
Whiteboard: patch ready
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: