[Seaside] Kom/Seaside/Apache, gzip?
seaside at harford.org
Sat Mar 25 19:03:50 UTC 2006
I just tested it over an apache proxy doing SSL and it doubled the
download speed of my application.
It appears that in my situation it is quicker for Squeak to compress
the contents and apache to encrypt the compressed content than it it
to encrypt the non-compressed content.
I would highly recommend to anyone to give the below code a try in
your situation. Why waste the bandwidth, your users on slower
connections will see a big increase in download speed, your users on
faster connections will have more bandwidth for other things, and you
might save a few bucks on your ISP costs.
I don't see there being much or any downside to doing this (maybe a
bug or two) and you get to be a good net citizen by conserving
Personally I would love to see it's widespread adoption.
On Mar 23, 2006, at 3:55 AM, Lukas Renggli wrote:
>> Gziping content makes a huge difference with our applications. Does
>> Kom support this? If it does not appear that it would be a huge
>> undertaking. Any pointers on where to begin ?
> You could subclass WAKom and start with something like:
> WAKomCompressed>>convertResponse: aResponse
> | response gzip stream |
> response := super convertResponse: aResponse.
> response fieldAt: 'Content-Encoding' put: 'gzip'.
> gzip := GZipWriteStream on: (stream := RWBinaryOrTextStream on: '').
> gzip nextPutAll: aResponse contents contents; close.
> ^ response contents: stream reset
> This code does not check if the user-agent supports compressed
> responds, most todays user-agents do that anyway and one could add it
> However I doubt that this will make the web-application any snappier,
> I guess it is even much slower because the stream has to be copied to
> a compressed one. After all the XHTML of Seaside is already quite
> dense, there are no unnecessary spaces as with most other frameworks.
> It is a bit trickier and requires some modifications to Seaside if you
> want to directly stream you answer into a compressed stream, tough it
> should be possible.
>> Does anyone know if Apache can act a a gzip proxy ? Gziping non-ziped
>> content served from seaside. Has any one done this? Any examples?
> I never felt the need to do anything like that, the bottleneck is
> usually the persistency backend or the domain-model itself, not the
> network connection.
> Lukas Renggli
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
More information about the Seaside