Closed Bug 515956 Opened 15 years ago Closed 2 years ago

Optimize UTF8 decoding in nsUnicharInputStream

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: alfredkayser, Unassigned)

References

Details

(Keywords: perf)

Attachments

(1 file)

nsUnicharInputStream currently uses the UTF8Utils conversion routines, which require that the input chunk is first walked to calculated output length and then converted (using really slow code).
For this calculation, nsUnicharInputStream uses its own calculator code.
By replacing this calculator code with a direct UTF8ToUnicode conversion function, optimized for this function, this UTF8 streamer will be much faster (and even smaller).

Before: 31354 Sep 11 16:31 nsUnicharInputStream.obj
After: 30854 Sep 11 16:29 nsUnicharInputStream.obj

(the patch also gets rid some unnecc. includes).
Assignee: nobody → alfredkayser
Status: NEW → ASSIGNED
Depends on: 506430

The bug assignee didn't login in Bugzilla in the last 7 months.
:nika, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: alfredkayser → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(nika)

The UTF8InputStream type no longer exists

Status: NEW → RESOLVED
Closed: 2 years ago
Flags: needinfo?(nika)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: