Closed Bug 410264 Opened 17 years ago Closed 17 years ago

tweak NS_ReadLine to be more efficient

Categories

(Core :: Networking: File, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla1.9beta3

People

(Reporter: dwitte, Assigned: dwitte)

Details

(Keywords: perf)

Attachments

(1 file, 1 obsolete file)

Attached patch like so (obsolete) — Splinter Review
dolske discovered nsILineInputStream is doing a bunch of 1-byte reads on startup: http://mxr.mozilla.org/mozilla/source/netwerk/base/public/nsReadLine.h#191 i looked long and hard at this, and couldn't really figure out why that's necessary (maybe bz remembers?). i'm pretty sure, unless i'm completely missing something, that the normal loop can handle the eolStarted-but-buffer-exhausted case just fine. and i've tested this, with the buffer ending smack in the middle of an \r\n, and it works. i also, completely subjectively, think we could up the buffer size to 4k - 1k seems a little small these days. maybe more? ;)
Attachment #294900 - Flags: superreview?(cbiesinger)
Attachment #294900 - Flags: review?(cbiesinger)
See bug 397850? It looks like it might cover this change...
Comment on attachment 294900 [details] [diff] [review] like so oh. :( looks like mats beat me to it! anyway, i still have one change left :)
Attachment #294900 - Attachment is obsolete: true
Attachment #294900 - Flags: superreview?(cbiesinger)
Attachment #294900 - Flags: review?(cbiesinger)
Attached patch v1.001Splinter Review
hooray :/
Attachment #294902 - Flags: superreview?(cbiesinger)
Attachment #294902 - Flags: review?(cbiesinger)
Keywords: perf
Attachment #294902 - Flags: superreview?(cbiesinger)
Attachment #294902 - Flags: superreview+
Attachment #294902 - Flags: review?(cbiesinger)
Attachment #294902 - Flags: review+
Attachment #294902 - Flags: approval1.9?
Attachment #294902 - Flags: approval1.9? → approval1.9+
checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: