In reference to why code can be so slow? I am creating this seperate node to get the most performance out of your (new) CGI script.

I have received many replies from the Perlmonks that were of value where to start optimizing that slow script. Still, there are a lot of unanswered questions where code should (not) be optimized, ... This node will be dealing with those questions and experiences I get of having a script which is merely giving 1 hit/sec to a normal amount of hits which should be atleast 50 times more. I will try to keep this node up-to-date as possible to help other monks with the same problem of having speed-i-gitis.

I have received the following hints to optimize a script to be getting better performance than before:

Development tools: (jbert)

Ways to improve speed: Unanswered questions: Probably a lot more of questions/hints and tips will be added to this list; I hope to help the web developers around here with a problem which apparantly strikes us all; which probably also can be avoided by having the know-how of which to use, what to (not) do and especially what to watch out for.

Many thanks already to the monks for the contribution to the previous SOPW.


In reply to Optimizing a web application for the best performance by freakingwildchild

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.