I used the same chunking size that is used for writing out the file 
later in the method. Since the Ethernet packet size is about 1500 bytes, 
it's going to take multiple packets to fill in that chunk size anyway.

Thanks.
Tom

Shawn Walker wrote:
> Tom Mueller (pkg-discuss) wrote:
>> Issue: Unable to publish large file on Windows XP
>> http://defect.opensolaris.org/bz/show_bug.cgi?id=2732
>>
>> Webrev: http://cr.opensolaris.org/~tmueller/cr-2732/
>>
>> This change addresses a problem that is seen on Windows XP when 
>> publishing a large file (> 3MB).  A MemoryError is thrown on the 
>> server when the entire content is read in a single read method call.
>>
>> The fix is to read the data from the connection in 64KB chunks. This 
>> fix uses the same method as is used by the socket module for 
>> constructing the data buffer from multiple reads. I wrote a test 
>> program to try out various methods of doing this, and was somewhat 
>> surprised to see that using cStringIO, for example, is actually 
>> slower than doing it this way.  Let me know if you are interested in 
>> seeing the test program.  This buffering adds about .06 seconds of 
>> CPU time to the processing of a 20MB file on my workstation.
>
> This change seems fine to me, although I do wonder about the chunk 
> size and tunability.
>

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to