Speed v Version

Toby Wintermute tjc at wintrmute.net
Fri Jun 3 08:28:37 BST 2011

On 1 June 2011 18:46, Dirk Koopman <djk at tobit.co.uk> wrote:
> I contemplating providing "encouragement" to a customer to upgrade from
> 5.8.7 to something more modern. One of the overriding issues is "speed". The
> customer is fixated with "speed".
> Unfortunately one of the major things the customer's clients do is
> "replicate" their ISAM data into databases, usually MS-SQL via DBI and
> DBD::ODBC. The ISAM data is always on Linux (and a few Unix) boxes. The
> replication is a batch process that must complete overnight. Currently it is
> a fairly close run thing.
> I don't suppose anyone has done any speed benchmarking on the various perls
> to date? Still less on newer DBIs etc? All the customer's modules are circa
> 2005.

Are they running old Red Hat or CentOS versions?
I ask because the Perl shipped on those was, for quite a long time,
very, very broken due to a vendor patch that made bless() take 1000x
longer than it should. In that case, just using a non-broken Perl will
be extremely faster.

Perl 5.10.x onwards are significantly faster when operating on modules
which make heavy use certain types of inheritance.
I seem to remember around ~20% performance improvements moving from
5.8.8 to 5.10.0, on a particular application. But that was probably a
best-case (or worst case) scenario.

I've had a fair bit of experience at getting brought in to fix
people's really-long-running Perl DB imports, and every time it comes
down to optimising the database interactions, or *maybe* optimising
some particularly  stupid Perl code.
As others have said - profile the code!
If 90% of your time is spent in DBI::db::execute() then start looking
at the SQL they're running..


Turning and turning in the widening gyre
The falcon cannot hear the falconer
Things fall apart; the center cannot hold
Mere anarchy is loosed upon the world

More information about the london.pm mailing list