Closed Bug 213197 Opened 21 years ago Closed 3 years ago

make GetUnicodeEncoder/GetUnicodeDecoder use a hashtable and cache factories

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

RESOLVED WORKSFORME
mozilla1.6alpha

People

(Reporter: dbaron, Assigned: dbaron)

Details

(Keywords: perf, Whiteboard: [patch])

Attachments

(1 file, 3 obsolete files)

While bug 212475 should have fixed at least some of the performance problem,
GetUnicodeEncoder / GetUnicodeDecoder have shown up in profiles for a while.  I
have a patch to make them use a hashtable, although I didn't see an improvement
on the page load tests.  That might mean there's a problem with the patch, but
I'll attach it anyway...
Status: NEW → ASSIGNED
Keywords: perf
Priority: -- → P2
Whiteboard: [patch]
Target Milestone: --- → mozilla1.6alpha
The perf test results I did, from before bug 212475 landed, were:

without:
                                                                                
    Test id: 3F109DA65B  [ done on previous day; perhaps different
                           network conditions, etc.]
    Avg. Median : 432 msec      Minimum     : 182 msec
    Average     : 441 msec      Maximum     : 1246 msec
                                                                                
    Test id: 3F11F39E42
    Avg. Median : 432 msec      Minimum     : 172 msec
    Average     : 439 msec      Maximum     : 1214 msec
                                                                                
                                                                                
with patch:
                                                                                
    Test id: 3F11F24085
    Avg. Median : 426 msec      Minimum     : 183 msec
    Average     : 433 msec      Maximum     : 1202 msec
                                                                                
    Test id: 3F11F4EBB1
    Avg. Median : 431 msec      Minimum     : 176 msec
    Average     : 436 msec      Maximum     : 1223 msec
I think I got the first serious merge conflicts with this patch from bent's work in bug 404386.
Attached patch patch (obsolete) — Splinter Review
Here's the patch that applied a few days ago.
Attachment #128090 - Attachment is obsolete: true
Attached patch patch (obsolete) — Splinter Review
And this is basically the same, but reverting the conflicting parts of bent's patch.  That said, some of those parts may be better than what's here.
Attachment #300408 - Attachment is obsolete: true
Attachment #300441 - Attachment is patch: true
Attachment #300441 - Attachment mime type: application/octet-stream → text/plain
I tried a talos try server run, but I couldn't tell if things were any faster or not.
QA Contact: amyy → i18n
Attached patch patchSplinter Review
This is updated to be on top of the patch in bug 530328.
Attachment #300441 - Attachment is obsolete: true
Summary: make GetUnicodeEncoder/GetUnicodeDecoder use a hashtable → make GetUnicodeEncoder/GetUnicodeDecoder use a hashtable and cache factories
Moving to p3 because no activity for at least 1 year(s).
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage for more information
Priority: P2 → P3

No longer relevant due to encoding_rs.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: