Closed
Bug 97172
Opened 24 years ago
Closed 24 years ago
startup perf- remove the need of loading of maccharset.properties files at startup time to speed up
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: ftang, Assigned: nhottanscp)
References
Details
(Keywords: perf)
Attachments
(2 files, 2 obsolete files)
5.50 KB,
patch
|
ftang
:
review+
|
Details | Diff | Splinter Review |
5.52 KB,
patch
|
Details | Diff | Splinter Review |
we currently load maccharset.properties at startup time, we should find a way to
remove the need of loading it at startup time to speed up startup performance
we could
1. build in common used pair in the cpp code, and/or
2. cache the resolved result in registry.
![]() |
||
Updated•24 years ago
|
![]() |
||
Comment 1•24 years ago
|
||
per offline discussion with ftang - tentatively reassigning to myself
Assignee: ftang → jbetak
![]() |
Reporter | |
Comment 2•24 years ago
|
||
mac sutff, move to ftang for now.
Assignee: jbetak → ftang
OS: All → Mac System 9.x
Hardware: All → Macintosh
![]() |
Reporter | |
Comment 3•24 years ago
|
||
nhotta- can you handle this?
what we should do is
1. move the loading of property file from constructor to a seperate
InitInfo() function
2. build in some common used mapping into c++ (for US, JA, DE and FR ) so we
don't need to look at those mapping in the property file if we running on those
tier 1 platform
3. call InitInfo right before we really need to access those mapping.
In this way, we keep both the dynamic part and tuning the performance at the
same time.
Assignee: ftang → nhotta
Target Milestone: --- → mozilla0.9.6
![]() |
Assignee | |
Comment 4•24 years ago
|
||
![]() |
Assignee | |
Comment 5•24 years ago
|
||
![]() |
Assignee | |
Updated•24 years ago
|
Status: NEW → ASSIGNED
![]() |
Reporter | |
Comment 6•24 years ago
|
||
- PR_AtomicIncrement(&gCnt);
why you want to do that ? we should always have balance of
110 PR_AtomicDecrement(&gCnt);
in the destructory. if you remove this you proably also need to change the
destrcutor
+ PR_AtomicIncrement(&gCnt);
gCnt is the count of nsMacCharset object. it should be in the contstructor.
+ if (NS_FAILED(rv)) { charset.AssignWithConversion("x-mac-roman");}
please break the if statement into multiple line
don't put the body of the block and the if in the same line.
we won't be able to set break point in the body of the block
![]() |
Assignee | |
Comment 7•24 years ago
|
||
![]() |
Reporter | |
Updated•24 years ago
|
Attachment #52611 -
Attachment is obsolete: true
![]() |
Reporter | |
Updated•24 years ago
|
Attachment #52618 -
Attachment is obsolete: true
Attachment #52618 -
Flags: review+
Attachment #52618 -
Flags: needs-work+
![]() |
Reporter | |
Comment 8•24 years ago
|
||
Comment on attachment 52649 [details] [diff] [review]
Patch, updated to ftang's comment.
look fine r=ftang
Attachment #52649 -
Flags: review+
Comment 9•24 years ago
|
||
+ nsAutoString propertyURL(NS_LITERAL_STRING("resource:/res/
maccharset.properties"));
+ nsURLProperties *info = new nsURLProperties( propertyURL );
Not your fault, but nsURLProperties() needs to be updated to use some newer
string stuff (e.g. is its argument read-only?).
+nsresult nsMacCharset::MapToCharset(short script, short region, nsString&
charset)
Is 'charset' an out param? Rename it to make this clearer (e.g. 'outCharset').
+ rv = pMacLocale->GetPlatformLocale(&localeAsString, &script, &language, &
region);
Ugh, GetPlatformLocale takes a nsString*. Needs fixing later.
Rename 'charset' and sr=sfraser.
![]() |
Assignee | |
Comment 10•24 years ago
|
||
![]() |
Assignee | |
Comment 11•24 years ago
|
||
Checked in to the trunk.
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.
Description
•