in reply to is 'my' that much faster than 'local'?

Your scripts are 20-150k and almost all globals?

That must be a maintainance nightmare!

I would recommend (over time of course) reorganizing, using strict, and using tightly scoped lexicals. The reduction in debugging effort alone will make this pay back many times over...

  • Comment on Re (tilly) 1: is 'my' that much faster than 'local'?

Replies are listed 'Best First'.
Re: Re (tilly) 1: is 'my' that much faster than 'local'?
by jbert (Priest) on Mar 27, 2001 at 12:06 UTC

    Agree.

    You want performance improvements? Analyse the box to see what the load problem is (cpu/memory/disk/network).

    If you are doing lots of perl CGI is it because you do a lot of processing per-request or is it a high number of requests with little processing (so the CGI fork is killing you).

    In the former case, you have some CGIs which do a lot of processing. Benchmark those and try and improve the hotspots (think about algorithm changes, moving stuff out of loops, changing your data structures around).

    In the latter case you need to get away from CGI. So bite the bullet and go for a maintainable re-implementation (with all that tilly mentioned) of what you have now (whilst possibly adding a little more grunt to your server(s) in the short term to cut you some slack until the mod_perl version is ready).

    You *really* don't want to take your existing code, run it through a local->my mangler than *then* port it to mod_perl. Or maybe you do, but I wouldn't want to.