On Fri, Nov 18, 2011 at 11:20:00PM -0800, Michael G Schwern wrote:

> I did some profiling and easy optimizations which sped things up quite a bit,
> but it didn't translate into real world improvements.  Turns out the real
> problem is startup time.
> 
>     use Test::More;
> 
> 0.98
> real  0m0.021s
> user  0m0.016s
> sys   0m0.004s
> 
> 1.5
> real  0m0.092s
> user  0m0.083s
> sys   0m0.008s
> 
> That's going to be a tough one to cut down

But then how often does one need to 'use Test::More'?  Not enough to
bother optimising it, I'd say.

To take a real-world example, it occurs 182 times in our test suite at
work, a test suite that takes almost 2 hours to run in full.  Those
extra 182 * 0.07 == 13 seconds are of absolutely no importance at all.

Also bear in mind that in the Test::Class world, a great many test files
will get run in the same perl process, so that 0.07 second hit will be a
one-off for many instances of 'use Test::More'.

If you like, I can benchmark the new Test::More/Builder against our code
and we can see whether the slowdown is *really* significant or not.

-- 
David Cantrell | Reality Engineer, Ministry of Information

    Seven o'clock in the morning is something that
    happens to those less fortunate than me

Reply via email to