The only thing you can be certain of is how you construct your page. Everything else is variable.

If your focus is speed, then it really depends on what you are optomising it for - broadband or narrowband? If you will be using your site via a modem, and from the office where you have a fat pipe, i'd reckon you'd want to go the path of the lowest common denominator - narrowband.

From experience, if youre doing mainly narrowband, then you're looking at around 30Kb page sizes. The method in which you construct your pages is where you'd be looking at optomising.

Making the assumption your content is dynamic, I'd be looking at indexing strategies in your database, and indeed, what database platform you will be using, and how it is built and tuned.

As a general thing, keep your db handles open during the execution of your script, and perform multiple fetches on the same handle. Creating the handle is quite expensive, and I've seen many people open disreet handles for each time they want to access their database.

Use placeholders in your queries, the db will cache the statements and use the cached copy rather than "re-doing" a new query with hardcoded variables..

Use mod_perl. Its fast, but you have to have a decent amount of RAM. there are lots of tuning options there for you to make the most of.

The most obvious thing I can think of is keep your IO to a minimum - its expensive, however with everything there is a trade off. If you embed all your html, it makes maintaining your site harder, however if you template everything in existance, you will perform too many IO's. As a general rule I template my sites (HTML::Template) but generate some HTML to fill the gaps.

I read a study a while back which stated a human will consider sub 2 second lag as a contiguous operation, whereas when lag exceeds 2 seconds the operation becomes fragmented to the human mind, and it begins to break the concentration cycle. When i'm designing sites, I try get my pages to load in the sub 2s range as a general rule. Unfort I dont have the reference handy, otherwise I'd quote it.. ;-(

HTH


In reply to Re: speed : client or server side by Ryszard
in thread speed : client or server side by silent11

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.