Closed Bug 328289 Opened 20 years ago Closed 20 years ago

dtd's should be read using 4096 bytes buffers, instead of 1024 bytes buffers

Categories

(Core :: XML, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: martijn.martijn, Assigned: alfredkayser)

References

Details

(Keywords: perf)

Attachments

(1 file)

See bug 109207, comment 28: " An additional comment: During some testing of libjar, specifically the JARInputStream stuff, I saw that DTD's are now read using JARInputStream, however the the dtd's are read using 1024 bytes buffers, instead of the usual 4K buffers. Just increasing the buffer from 1024 to 4096 would allready save some pain. (having the same buffersizes in buffered IO is very important, as the opposite would destroy the buffering completely). " And bug 109207, comment 31: " About the 1024 byte buffer issue: Checkout: http://lxr.mozilla.org/mozilla/source/parser/htmlparser/src/nsExpatDriver.cpp#646 rv = NS_NewUTF8ConverterStream(getter_AddRefs(uniIn), in, 1024); This tells me that a 1024 byte buffer is used for DTD reading. All other jar-reading and other file reading is using 4K buffers. So, using the same buffersize will improve the performance. Testing is required to find out how much, but it is a very simple patch, with very minimal risk! " I asked Boris about this, and he basically said: "Just do it!"
Blocks: 109207
Attached patch patch — — Splinter Review
The patch the way Alfred suggested it.
Attachment #212874 - Flags: review?(bzbarsky)
Assignee: xml → alfredkayser
Attachment #212874 - Flags: superreview+
Attachment #212874 - Flags: review?(bzbarsky)
Attachment #212874 - Flags: review+
Checking in parser/htmlparser/src/nsExpatDriver.cpp; /cvsroot/mozilla/parser/htmlparser/src/nsExpatDriver.cpp,v <-- nsExpatDriver.cpp new revision: 3.95; previous revision: 3.94 done
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: