[ENH] FastSocketStream-gk

goran.krampe at bluefish.se goran.krampe at bluefish.se
Thu Feb 10 16:04:16 UTC 2005


Hi folks!

When trying to figure out why uploads using HTTP POST was so horribly
slow (bordering on not working at all) using KomHttpServer in 3.7 I
decided to simply rewrite the whole SocketStream class from scratch.

Later updates 6341 and Avi's 6521 (hmm, I fixed that too - sigh) have at
least made upload bareable - but my FastSocketStream improves the speed
*another* 10x. :) Uploading a 5Mb file locally now takes 0.3 seconds
including writing on disk.

This class also improves HTTP serving speed in general in KomHttpServer
depending on payloads, keep-alive etc. For some setups it doesn't seem
to help - and for others it screems.

It also has less bugs. The class comment is full of details - and is not
meant to be the final class comment - instead it is meant for you guys -
testers and developers. :)

While making sure I got the most out of FastSocketStream I also ended up
improving KomHttpServer in various ways - but more on that another day.

regards, Göran



from preamble:

"Change Set:		FastSocketStream-gk
Date:			10 February 2005
Author:			Göran Krampe

This is FastSocketStream - a candidate to replace SocketStream. It is
heavily described in the class comment and has good method comments too.
:)

It also works with the bugs showed in SocketStreamTest - those bugs are
explained in detail in the FastSocketStream class comment.

The changeset also adds two IMHO missing methods in Socket.

NOTE that this changeset is not posted for inclusion as is - instead it
is posted so that people can test it. If you have code using
SocketStream - instead drop this class in and report any problems."!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FastSocketStream-gk.cs.gz
Type: application/octet-stream
Size: 8776 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050210/01965759/FastSocketStream-gk.cs.obj


More information about the Squeak-dev mailing list