Willem van den Ende
squeak at willemvandenende.com
Mon Feb 14 17:01:31 UTC 2005
cool that someone is working on this! Maybe the new FastSocketStream can solve
a problem I've been having...
I'm writing a webspider in squeak, and as far as I could find out (it happens
occasionaly... haven't managed to write a test for it. I wrote some logging
code to pinpoint it) the old SocketStream locks up the image sometimes on
slow sites (cpu usage goes from between 3 and 10 percent to 99 when it locks
up). Frustratingly enough, lockups don't happen when I query the same page
I'm using SocketStream under the SWHTTPClient package (it is less automagic
than the httpclient that comes with the image). Differences with
FastSocketStream seems that it (hopefully) does not lock up the imate.(I have
to run more tests to be confident about this- it takes ages...). On the
downside, it does generate more 'a primitive has failed' errors and
'ConnectionClosed: Connection closed while waiting for data.' (the old
SocketStream didn't generate those).
I'm using a 3.7 image with a /3.7b-5 VM from ian pumarta's site. I used an
older vm as well, with the same problems.
The good news is, the FastSocketStream does seem to be faster on sites that
are not slow, and I hope it doesn't lock anymore...
I hope this helps. Keep up the good work!
On Thursday 10 February 2005 17:04, goran.krampe at bluefish.se wrote:
> 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."!
More information about the Squeak-dev