Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • The use.perl server really needs to get more reliable before this ajax stuff will be usable. The frequent connection timeouts make it impractical.
    • Maybe it's you? I have very rare timeouts.
        • Those connection issues were two months ago. I know the site can be slow occasionally, and during code refreshes we can be down of course, but I've noticed no significant connection issues recently.
          • What irks me personally is that the entire eight hundred sixty kilobytes YUI albatross is loaded every other time I visit even though I have disabled the Slash Ajax stuff in my prefs.

            I know I can check the box to enable the Ajax UI on any page I look at, should I ever change my mind, and that the Ajax UI then immediately starts working, which means some Javascript is needed. But you’re loading jQuery as well anwyay, which is tiny and perfectly servicable for loading extra libraries on demand. It sho

            • What irks me personally is that the entire eight hundred sixty kilobytes YUI albatross is loaded every other time I visit ...

              Then stop clearing your cache! And use a browser that handles compression.

              ... even though I have disabled the Slash Ajax stuff in my prefs

              No, you don't. You have Discussion 2 disabled. That's only one specific thing that uses Ajax on the site

              ... you're loading jQuery as well anwyay ...

              As of a couple of weeks ago.

              It should be easy to load YUI via jQuery, and to make that conditional on whether the Ajax UI is enabled.

              We don't use YUI for Ajax.

              Actually, we don't even use YUI for any of Discussion 2.

              You make some valid points, but you really don't know the code nearly well enough to be making the assertions you do.

              • Hi Chris,

                I've been fighting the same problems on a website I'm working on (using scriptaculous instead of YUI, but the same issues with large JS). I've got a couple of easy tricks to get huge compression.

                I use yuicompressor to squish my JS and then gzip it. Simple .gz content works smoothly on all browsers except Safari. To make it work with Safari too, all you have to do is name your file .jsgz instead of .js.gz and then do the following in your apache conf:

                    <files *.jsgz>
                      ForceType text/javascript
                      Header set Content-Encoding: gzip
                    </files>
                With those tricks, I predict use.Perl.org can get about a factor of 20 compression. The tricks work on CSS files too with a lower compression ratio.

                If the above interests you, I'd be happy to volunteer an hour or two to dig into slashcode to help implement -- basically a simple tool to make the gz files. I run my tool a mod_perl launch time, but it could be part of any deploy step.

                I agree that cache mitigates the problem, but it's so easy to fix that the payoff is worthwhile.