Forum OpenACS Q&A: rl_returnz turned on at openacs.org

Collapse
Posted by Jeff Davis on
We turned on returning gzip encoded content at openacs.org.
Please let us know if you run into any problems displaying pages.
Collapse
Posted by Roberto Mello on
Things are being displayed _a lot_ faster here on my end, so that's great news. Thanks Jeff!

-Roberto

Collapse
Posted by Jonathan Ellis on
here, too.  i didn't realize oacs.org had such heavyweight pages.
Collapse
Posted by Jonathan Ellis on
btw, did you get the version with my patch to workaround the IE bug?
Collapse
Posted by Janine Ohmer on
FWIW, it seems a bit slower to us here at furfly HQ. This may be because we're on a T1, so for us the savings in transmission time may be smaller than the extra overhead of unzipping.  I'm using Mozilla and Mike is using Safari, both on Mac OS X.

I'm not suggesting you change it back, since it obviously helps most people, but anyone wanting to use this in an environment of fast connections might want to do some testing first.

Collapse
Posted by Jeff Davis on
Janine, It seems mostly faster here in london (I have a 1mbs adsl line) and much faster on a couple big pages (like the list of posts for people with lots of posts and the main bugtracker page). Might have something to do with latency as well.

Jonathan, The version of rlreturnz I have has the IE workaround + some changes I made (handling i18n charset stuff). You can download the code we are using at http://xarg.net/download/rlreturnz.tar.gz

I don't remeber exactly where I got the original code from, I think I got the link from a thread here though.

If anyone else has fixes they should post them.

Collapse
Posted by Roberto Mello on
I'm on a T3 and it's much faster here so I don't think it's a problem with being in a fast connection.

Maybe mozilla and safari on OS X don't deal as well with gzipping, or maybe it's just regular OS X speed 😊

-Roberto

Collapse
Posted by Jade Rubick on
My Safari on OS X is much faster, so I don't think that's it. We're on a DSL line.

And if you haven't tried out OS X recently, you might be surprised how much better it performs than earlier versions. I'm quite happy with it as my developmental computer.

Collapse
Posted by Don Baccus on
Jeff ... is this suitable for sticking into the OpenACS 4 HEAD , with a parameter to turn it on or off?
Collapse
Posted by Jamie Rasmussen on
Tom J. cleaned up the module, renamed it nsreturnz, and last I heard was preparing to check it into the main AOLserver repository on SourceForge along with nsrewrite.
Collapse
Posted by Frank N. on
Jeff: When I started using mod_gzip on Apache, I did a bit of digging, and from looking at your code I think you may need a few more exceptions. Basically you also want to turn of gzip for old Netscape browsers, and during the authentication process. Wether the internal operation of AOLserver does the latter automatically I don't know, but that is what is recommended by the mod_gzip gurus, as this breaks the authentication process for some (a few) obscure browsers versions out there.

The crucial lines from the mod_gzip.c section of a httpd.conf file are:

mod_gzip_item_exclude rspheader WWW-Authenticate:.*
mod_gzip_item_exclude reqheader "User-Agent: Mozilla/4\.0[^ ]"

Frank.

Collapse
Posted by Tom Jackson on

Jamie,

I was looking into that again today since this thread started up. I'll do it tomorrow (today actually) given ok from the core team.

Sorry for the delay, it is all ready to go.

Collapse
Posted by Jeff Davis on
Frank, two things, the first is that it really isn't my code. It was originally written by Jim Wilcoxson (for rubylane.com hence the rl) I just patched it to handle character encodings.

The second is, of the 100k hits in the openacs log only 55 actually trigger the old mozilla rule and of those I would say probably 25 or so are fake UA strings (typically robots probing for formmail.pl holes or other spidery things and if they advertise accepting gzip then thats their problem).

So for the 0.03% of browsers we might cause a problem for and given what those users web experience must be like already, I certainly am not going to go out of my way to fix it.

If you do want to fix it then I would say that you should probably match on "Mozilla/4.0[0-9]" since I also see things like Mozilla/4.0+(compatible;+MSIE+6.0;) and Mozilla/4.0+(compatible;) (spiders I would assume).

Collapse
Posted by Frank N. on

I dug out the link to the explanation of the authentication problem, not sure if it applies to AOLserver.

Also mod_gzip, currently hosted at SourceForge, includes some additional details of the broken browsers in the included HTML docs. You also want to exclude stand alone js and css files:

mod_gzip_item_exclude file \.js$
mod_gzip_item_exclude file \.css$

Collapse
Posted by Frank N. on
Jeff, our messages crossed.

You've got a point there re. not taking NS4.0* into account in the general case. Also the current mod_gzip docs do suggest a more strict regexp for matching the way you describe:

mod_gzip_item_exclude        reqheader  "User-agent: Mozilla/4.0[678]"

The reason why I am slightly concerned about this, is that I am working on a project, where the target audience statistically is a low income demographic. I know for a fact that many of the persons, who might be interested in what I am working on, still do use very old machinery on modem connections. Ie. Windows 95 is still in use out there with who knows what for a browser. So gzipped content would be especially valuable for the clients on modems in those cases where it works reliably.

Collapse
Posted by Jeff Davis on
Yeah, that's a good point. I can muster some sympathy for someone on a slow machine on an unreliable dialup I guess.

On the .js, .css issue in openacs now we don't really ns_return any .js or .css so it's sort of a nonissue (although I can see doing dynamic css at least). I am not sure if the .js and .css problem is addressed by the IE padding (I think it is, certainly the printing problems are).

Same thing and WWW-Authenticate, most openacs sites don't really use it (and for those that do I expect it is during devlopement and most of the people looking have modern browsers which just do the right thing).

Maybe someone will address those issues, but so far they don't really seem to have been a problem (and rubylane for example gets a lot of traffic and I would think it probably sees more old browsers than most sites and Jim Wilcoxson has said they don't have problems with the gzip encoding).

Collapse
Posted by Jade Rubick on
Tom, can you post something here once you've uploaded your version?

Is that the version I should use, or should I use Jeff's version? I understand both are based on Jim's version, but does it matter which one I use?

Collapse
Posted by Jeff Davis on
Jade if you have text on your site which is not acsii-7 and you use
aolserver3.3+ad13 then you should use my version.
Otherwise, you should use one that is not really encoding aware.
Collapse
Posted by Joel Natividad on
I noticed that gzip-encoding has been turned off on openacs.org.  How come?
Was the gzip compression penalty not worth it?
Collapse
Posted by Chris Davies on
I believe during some hardware failure the openacs.org server was upgraded to AOLServer 4.0 -- and most likely, gzip encoding just wasn't turned back on yet.
Collapse
Posted by Jeff Davis on
Joel, the version we were running here for aolserver 3.x doesn't work for aolserver 4. I have updated it to do so but wanted to do some more testing before I switched openacs.org to using it.