Closed
Bug 212223
Opened 21 years ago
Closed 7 months ago
Charset alias performance issues
Categories
(MailNews Core :: Internationalization, defect)
MailNews Core
Internationalization
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: bzbarsky, Assigned: smontagu)
Details
(Keywords: intl, perf)
I'm looking at a jprof profile here...
There are 112 hits under nsStandardURL::SetSpec
Of these, 40 are under GetCharsetAlias; the breakdown is:
84317 0 40 nsCharsetConverterManager::GetCharsetAlias
24 nsCOMPtr_base::assign_from_helper
10 _ZN15nsCharsetAlias212GetPreferredERK10nsACStringRS0_
1 _ZN13nsCOMPtr_baseD2Ev
1 _ZN12nsAutoStringC1Ev
1 _ZN9nsCStringD2Ev
1 _ZN10nsACString21do_AssignFromReadableERKS_
1 _Z7CompareRK10nsACStringS1_RK19nsCStringComparator
1 _ZNK9nsCString6LengthEv
There are a few issues here:
1) We may want to cache the charset alias service
2) GetPreferred should be much faster. Here is a breakdown of the time spent
under GetPreferred:
84234 2 11 _ZN15nsCharsetAlias212GetPreferredERK10nsACStringRS0_
4 _ZN10nsACString21do_AssignFromReadableERKS_
3 _ZN13nsCAutoStringC1ERK10nsACString
1 _Z7CompareRK10nsACStringS1_RK19nsCStringComparator
1 _ZNK26nsDefaultCStringComparatorclEPKcS1_j
Note that most of the time is spent copying about strings. If this used a
hashtable with ascii keys and ascii values, most of this time could probably be
eliminated.
Updated•15 years ago
|
QA Contact: amyy → i18n
This code is no longer in Core.
Product: Core → MailNews Core
Updated•2 years ago
|
Severity: normal → S3
Comment 2•7 months ago
|
||
Could this still be an issue?
Comment 3•7 months ago
|
||
Let's close.
Status: NEW → RESOLVED
Closed: 7 months ago
Flags: needinfo?(mkmelin+mozilla)
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•