in reply to (Modules || Libarires) usage

I'm not sure that the size of your program is making things slow. Compilation is fast compared to database work, filesystem use, and network traffic. 2700 lines isn't huge for an entire Perl program, but 2000 lines per script is. If I were you, I would factor common code out of the scripts and into separate modules. That tends to have the effect of making everything smaller.

Replies are listed 'Best First'.
Re^2: (Modules || Libraries) usage
by cbrandtbuffalo (Deacon) on Jun 15, 2005 at 21:46 UTC
    This was my first thought also--I don't think the size of your program is the issue. If you are use'ing any CPAN modules, you might be surprised how many lines of code get pulled in there, but this is seldom the source of major performance problems.

    You can convert your libraries into modules for various reasons, but speed isn't necessarily one of them.

    It would probably be better to do some benchmarking and figure out what is slow. Now, benchmarking might be easier if you had your code in small, digestable chunks in a module.

    As mentioned the other responses, if you are running CGI code through a server, mod_perl will likely solve many of your speed problems.