Hey vroom, everybody {wave}

What do you guys think about changing all the links that pm generates from '/index.pl?node...' to just '/?node...'?

Seeing how the monastery is getting more and more hits everyday, it should increase performance.

Think about it: that's 8*n(number of links) characters less it has to spit out everytime.

Yeah yeah, i know what the skeptics are saying, it ain't that much, it's only 0.09 CPU cycles or something, but as the monastery grows, it becomes more and more significant.

Ok, this will decrease the #chars served, but will it slow down the server any cause it has to figure out is it index.html or index.cgi or index.pl or something?

I don't think so, but what do i know;-)

P.S.
I don't think this has been discussed before cause i couldn't find anything, not even with SuperSearch, but if it has, please point /me to it.

 
___crazyinsomniac_______________________________________
Disclaimer: Don't blame. It came from inside the void

perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Replies are listed 'Best First'.
Re (tilly) 1: Decreasing PerlMonks Server Load
by tilly (Archbishop) on Mar 06, 2001 at 11:29 UTC
    Premature optimization is the root of all evil.

    First start with a clean and modularized design. Then identify bottlenecks. Then fix the identified bottlenecks. Up front coding designs that make it hard to later on identify and fix bottlenecks usually hurt performance in the end more than they help it. And they always hurt you on development time, maintainability, and bug counts.

Re: Decreasing PerlMonks Server Load
by dws (Chancellor) on Mar 05, 2001 at 21:31 UTC
    To paraphrase Sherlock Holmes,
    It is a cardinal sin to optimize before one has data.
    Trimming back URLs would indeed same 8 bytes here and there, but does onyone (besides possibly vroom or someone on the Everything Engine team) have measurements that suggest that network traffice is anywhere near a bottleneck? If so, an optimization focused on byte-level traffic might be warranted (though a scheme based on compressing redundant whitespace out of HTML would have a much bigger payoff).

    I rather suspect, based on a bit of experience with a similar engine, that the server is CPU bound.

    A well-intentioned thought, but one that needs to be pursued after measurement.

      If it's bound by anything, it's bound by memory and the database. I would expect the latter to be the bottleneck, if anything. Building an average page requires several trips to the database.

      I don't know how aggressively the node cache works in the version of Everything running this site. The performance tweaks in the latest version of the Engine (pre 1.0) involve aggressive caching to avoid extra trips to the database and compiling dynamic content.

      It's possible to tune things better, too, by serving images from a different server, by pre-requiring all modules before Apache forks off any kids, and by decreasing the memory requirement of each new kid.

      But sharing a pipe with E2 probably slows things down too.

Re: Decreasing PerlMonks Server Load
by arhuman (Vicar) on Mar 05, 2001 at 15:27 UTC
    Yeah ! good idea !
    Why not using Hexa or even better BASE 36 ([ A-Z0-9] ) to shorten the numbers used as index though the site ?

    I also suggest to shorten the name and the values of the parameter passed (to 2 characters whenever it's possible).

    and compression wouldn't hurt too, after all(?packed="d22eA5Op2ds78kSv4" could replace all those long parameters)...

    ;-)

    /me is just kidding...