PHP Developers Network
http://forums.devnetwork.net/

Optomizing/caching simpletest?
http://forums.devnetwork.net/viewtopic.php?f=39&t=36642
Page 1 of 1

Author:  nielsene [ Mon Aug 08, 2005 10:54 pm ]
Post subject:  Optomizing/caching simpletest?

I think something is wrong. The tests seem to take about 2 minutes to run, regardless of the number of tests cases (1 single runner versus the top level All.php). The application itself loads almost instantaneously.

Looking at the process monitor I see that I have 1.5GB of free RAM, and processor load is about 30% on one processor, other processor is basically un-touched. I'm running locally on a Dual 2.7GHz PowerMac with 2.5GB RAM.

Any idea as to what's causing the overhead with simpletest? (I could understand if there were an appreciable difference between single test versus all tests that the reflection for finding test methods could be slightly slow, but it should scale....)

Author:  McGruff [ Tue Aug 09, 2005 12:07 am ]
Post subject: 

Two minutes is a long time - A large group test might take a while but single test runners should be very quick.

I'm afraid I'm not sure what could be causing this.

Author:  Ambush Commander [ Tue Aug 09, 2005 10:37 am ]
Post subject: 

As with anything that takes a long time... Try profiling it!

Author:  nielsene [ Wed Aug 10, 2005 11:29 pm ]
Post subject: 

I hate heisenbugs.... Add calls to micro-time it takes ~10 seconds for the full set of non-web tests. Remove the timing calls it goes back to over a minute... Might just leave the timing calls in as it seems to help -- but its not just a perception thing. Timed it 10 times on each with a psuedo-random order to avoid cacheing type effects.

All the time is inside the run (as expected) so file parsing/including isn't a problem and no funny loops happening.

Author:  Ambush Commander [ Thu Aug 11, 2005 8:12 am ]
Post subject: 

Ow, that's icky. Have you tried to use a non PHP-based profiler like APD?

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/