Open Bug 364586 Opened 14 years ago Updated 11 years ago

nsXmlRpcCLient.js conversion to base64 is slow

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

ASSIGNED

People

(Reporter: mozbug, Assigned: samuel)

Details

Attachments

(1 file, 2 obsolete files)

Currently converting a stream to a base64-encoded string is quite slow, about 3.5 minutes for a 700K file.
The following patch will make the conversion 6 to 7 times faster.
Attached patch Patch for trunk (obsolete) — Splinter Review
Attachment #249349 - Flags: superreview?
Attachment #249349 - Flags: review?
Can't use just use btoa(), now that bug 326854 is fixed?
Indeed. I will try that tomorrow.
But this patch might still be used for 1.8 branch since bug 326854 is trunk only.
Attached patch Updated trunk patch (obsolete) — Splinter Review
|btoa| is now used for encoding and |atob| used for deconding as well
Attachment #249349 - Attachment is obsolete: true
Attachment #249427 - Flags: superreview?
Attachment #249427 - Flags: review?
Attachment #249349 - Flags: superreview?
Attachment #249349 - Flags: review?
You need to provide a requestee for your review requests, otherwise they'll likely be missed. I think samuel@sieb is a good choice.
Attachment #249427 - Flags: review? → review?(samuel)
I've switched it to use binary streams so we don't have to worry about nulls.  Please test it out and let me know how it works.
Assignee: mozbug → samuel
Attachment #249427 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #249427 - Flags: superreview?
Attachment #249427 - Flags: review?(samuel)
QA Contact: ashshbhatt → xml
You need to log in before you can comment on or make changes to this bug.