Closed
Bug 115387
Opened 23 years ago
Closed 23 years ago
avoid using MIME_ConvertCharset
Categories
(MailNews Core :: Internationalization, defect)
MailNews Core
Internationalization
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9.8
People
(Reporter: nhottanscp, Assigned: nhottanscp)
References
Details
(Keywords: perf)
Attachments
(2 files, 1 obsolete file)
(deleted),
patch
|
bugzilla
:
review+
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sspitzer
:
superreview+
|
Details | Diff | Splinter Review |
This mainly affects non ASCII headers.
MIME_ConvertCharset used to be used by message body conversion but now
converters are cached in MIME object and this is not used.
Currently, the main user is MIME decoder which needs conversion from MIME
charset to UTF-8. This can be done by i18n util function and NS_ConvertUCS2toUTF8.
Here is a data using Quantify. MIME decoder intl_decode_mime_part2_str() takes
less time (about 57%) when not calling MIME_ConvertCharset().
intl_decode_mime_part2_str, calling MIME_ConvertCharset
40
36.72
21579.74
0.00
0.00
0.92
0.69
1.31
intl_decode_mime_part2_str, not calling MIME_ConvertCharset
40
37.60
12334.15
0.00
0.00
0.94
0.71
1.33
Assignee | ||
Comment 1•23 years ago
|
||
Forgot the labels of the last data.
that is,
# of callls
Function time
F+D time
F time
F+D time (% of Focus)
Avg F time
Min F time
Max F time
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
Attachment #61826 -
Attachment is obsolete: true
Comment 4•23 years ago
|
||
Comment on attachment 62053 [details] [diff] [review]
Removed MIME_ConvertCharset and related code.
Looks good. R=ducarroz
Attachment #62053 -
Flags: review+
Updated•23 years ago
|
Attachment #62053 -
Flags: superreview+
Comment 5•23 years ago
|
||
Comment on attachment 62053 [details] [diff] [review]
Removed MIME_ConvertCharset and related code.
sr=sspitzer
Assignee | ||
Comment 6•23 years ago
|
||
checked in (on 12/18)
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 7•23 years ago
|
||
The following mimemoz2.cpp change commited in this bug removes the "res =" in
the "else" branch, which would cause *uninitialized value* to be compared with 0
in the case of NULL encoder or decoder...
@@ -764,16 +764,10 @@
PRInt32 res;
char *convertedString = NULL;
PRInt32 convertedStringLen;
- if (!input_autodetect && encoder && decoder)
+ if (encoder && decoder)
{
res = ConvertUsingEncoderAndDecoder(input_line, input_length, encoder,
decoder, &convertedString);
convertedStringLen = (convertedString) ? nsCRT::strlen(convertedString) : 0;
- }
- else
- {
- // Now do conversion to UTF-8 for output
- res = MIME_ConvertCharset(input_autodetect, input_charset, "UTF-8",
input_line, input_length,
- &convertedString, &convertedStringLen, NULL);
}
if (res != 0)
{
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 8•23 years ago
|
||
Comment 9•23 years ago
|
||
Comment on attachment 64205 [details] [diff] [review]
Changed mime_convert_charset to initialized the result value.
R=ducarroz
Comment 10•23 years ago
|
||
Comment on attachment 64205 [details] [diff] [review]
Changed mime_convert_charset to initialized the result value.
sr=sspitzer
Attachment #64205 -
Flags: superreview+
Assignee | ||
Comment 11•23 years ago
|
||
checked in
Status: REOPENED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Comment 12•23 years ago
|
||
Naoki, could you help verifying this? Thanks a lot.
QA Contact: ji → nhotta
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•