in reply to huge CPU load on simple DBI function - reason?

could loading all those subroutines be the problem? would it be better to split those up, and only call the ones I need - and if so, would (for example) five 'requires' be more ponderous than one require that has 5 subroutines in it?

Yes, that could be the problem, and yes, that could be a solution. Make a module which manages all those functions (kept in separate files via AutoSplit) via AutoLoader. Have a look at POSIX which just uses that mechanism, so you can say

use POSIX qw(strftime ceil execl);

to import (which means load and compile) only those three functions into your program.

Replies are listed 'Best First'.
Re^2: huge CPU load on simple DBI function - reason?
by MashMashy (Sexton) on Feb 01, 2009 at 17:53 UTC
    excellent, thank you so much for your help!