Closed
Bug 96529
Opened 24 years ago
Closed 24 years ago
delay loading of unicharutil in nsString case conversion code
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla0.9.6
People
(Reporter: ftang, Assigned: ftang)
References
Details
(Keywords: perf)
Attachments
(1 file, 2 obsolete files)
2.33 KB,
patch
|
ftang
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
this is a spin off from 75041
I find out one of the reason unicharutil get load into memory is nsString case
conversion. I have a fix for it and will include later for scc to review.
![]() |
Assignee | |
Comment 1•24 years ago
|
||
![]() |
Assignee | |
Comment 2•24 years ago
|
||
with this one and 96530, we can remove the loading of unicharutil.dll with
-chrome blank.xul.
Status: NEW → ASSIGNED
![]() |
Assignee | |
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.5
![]() |
Assignee | |
Comment 4•24 years ago
|
||
add jbetak to the cc list.
![]() |
||
Comment 5•24 years ago
|
||
![]() |
||
Comment 6•24 years ago
|
||
How about something like attachment 47922 [details] [diff] [review]? This basically does the same thing as
your patch, ftang, but avoids scanning the string first. It proceeds using the
ASCII to upper/lower conversion until it hits a non-ASCII character. At that
point, it faults in the unicode utilities and lets it process the remainder of
the string. (Check my math to make sure I got the length parameter right.)
![]() |
Assignee | |
Comment 7•24 years ago
|
||
while (cp <= end) {
....
+ result = PRInt32(aToUpper
+ ? gCaseConv->ToUpper(cp, cp, end - cp)
+ : gCaseConv->ToLower(cp, cp, end - cp));
while cp == end, it will go into the loop and end-cp will be equal to 0.
Is that right? should it be end - cp + 1 ?
![]() |
||
Comment 9•24 years ago
|
||
ftang: you are right! But perhaps a cleaner fix might be to simply let |end|
point one past the end of the string, and change the loop termination condition
to ``cp strictly less-than end''. Let me attach a patch...
![]() |
||
Comment 10•24 years ago
|
||
![]() |
Assignee | |
Comment 11•24 years ago
|
||
Comment on attachment 48230 [details] [diff] [review]
make |end| point one past end of the string, alter loop condition to strictly less-than
r=ftang
It looks better.
Attachment #48230 -
Flags: review+
![]() |
Assignee | |
Updated•24 years ago
|
Attachment #46902 -
Attachment is obsolete: true
![]() |
Assignee | |
Updated•24 years ago
|
Attachment #47922 -
Attachment is obsolete: true
![]() |
||
Comment 13•24 years ago
|
||
Comment on attachment 48230 [details] [diff] [review]
make |end| point one past end of the string, alter loop condition to strictly less-than
/me grumbles about selective respect for the 80 column limit.
sr=brendan@mozilla.org
Attachment #48230 -
Flags: superreview+
![]() |
Assignee | |
Updated•24 years ago
|
![]() |
Assignee | |
Comment 14•24 years ago
|
||
fixed and check in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Updated•5 years ago
|
Component: String → XPCOM
You need to log in
before you can comment on or make changes to this bug.
Description
•