AcidHawk has asked for the wisdom of the Perl Monks concerning the following question:

I have started to realise that this is a HUGE subject, with poeple devoting much of their time to comparing languages in shootouts etc. for performance gains.

My requirement is not as vast. What got me started down this line is a real issue I am currently experiencing.

I have script that reads a dir for files, when files are found it connects to a server and moves these files over the socket to the server. When I (using a test script) put a file into the watched dir I notice that the memory for this client process(which has been compiled using perl2exe) increases but then stays pretty static. I can actually send about 100 files in a few seconds and still see no increase in memory utilisation. However when I send 200 files the momory jumps again. The problem is that it doesn't release this memory.

I am currently using Devel::Size to test which of my vars/arrays/hashes etc are growing, but have to date not found where my problem is. I am also looking at putting Benchmark::Timer to use.

This really leads me to my current musing...

  • Should I start building test/benchmark code into my future scripts for debugging purposes..?
  • What do other monks do for benchmarking/testing their scripts?
  • When do you reach the point of "OK, this has too many tests"?
  • What other metrics do you measure (I.e. speed, memory)?
  • -----
    Of all the things I've lost in my life, its my mind I miss the most.