nsXmlRpcCLient.js conversion to base64 is slow

ASSIGNED
Assigned to

Status

()

ASSIGNED
12 years ago
9 years ago

People

(Reporter: mozbug, Assigned: samuel)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Reporter)

Description

12 years ago
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.
(Reporter)

Comment 1

12 years ago
Created attachment 249349 [details] [diff] [review]
Patch for trunk
Attachment #249349 - Flags: superreview?
Attachment #249349 - Flags: review?

Comment 2

12 years ago
Can't use just use btoa(), now that bug 326854 is fixed?
(Reporter)

Comment 3

12 years ago
Indeed. I will try that tomorrow.
But this patch might still be used for 1.8 branch since bug 326854 is trunk only.
(Reporter)

Comment 4

12 years ago
Created attachment 249427 [details] [diff] [review]
Updated trunk patch

|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.
(Reporter)

Updated

12 years ago
Attachment #249427 - Flags: review? → review?(samuel)
(Assignee)

Comment 6

11 years ago
Created attachment 274381 [details] [diff] [review]
new patch using binary streams

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.