Open Bug 197113 Opened 23 years ago Updated 3 years ago

nsConverterInputStream shouldn't buffer incoming bytes

Categories

(Core :: Internationalization, defect, P3)

defect

Tracking

()

mozilla1.5alpha

People

(Reporter: alecf, Unassigned)

Details

(Keywords: memory-footprint)

Continuing in my quest to reduce excess buffer copying, I've noticed that both implementations of nsIUnicharInputStream (the UTF8-only one in XPCOM, as well as the generic converter in intl/uconv/src) both use byte buffers to buffer input in order to do the conversion. There's really no need for it, as the input stream should be buffered or backgrounded as appropriate, and converted on demand when someone calls nsIUnicharInputStream::Read() or nsIUnicharInputStream::ReadSegments() (in fact they don't even need to buffer much of the unicode output, if the consumers are only calling ReadSegments() but that's a whole other beast!)
Status: NEW → ASSIGNED
Keywords: footprint
Target Milestone: --- → mozilla1.4beta
Priority: -- → P2
would be nice, but no time left in 1.4beta.
Target Milestone: mozilla1.4beta → mozilla1.5alpha
QA Contact: amyy → i18n
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

UTF8InputStream is gone, but nsConverterInputStream still copies uselessly.

Assignee: alecf → nobody
Status: ASSIGNED → NEW
Summary: UTF8InputStream/nsConverterInputStream shouldn't buffer → nsConverterInputStream shouldn't buffer
Summary: nsConverterInputStream shouldn't buffer → nsConverterInputStream shouldn't buffer incoming bytes
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.