in reply to including a package - time issue

You should probably have a look at modperl.
(http://perl.apache.org/)
There's also a book available for free: http://modperlbook.org/

Modperl will compile your perl scripts only once, and answer all requests with the already compiled scripts.

Update:
To go more into the details:
It's hard to say what needs 3 seconds, without having more data/the code.
I could think of:

However, all of the points above could be solved with modperl,
the database connection could also easily be made persistent.(Apache::DBI)