in reply to Slow wind-up in Windows?

On the basis on very little other than instinct, this sounds like it could be related to the same problem of freeing up hash buckets as discussed and described here freeing hashes on Linux?

The difference between the windows and Linux could be down to the version of malloc used by the two builds of perl?

It might be worth trying the POSIX::_exit() trick described in the thread above and see if you get any benefit.

Just a thought.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Replies are listed 'Best First'.
Re: Re: Slow wind-up in Windows?
by tall_man (Parson) on Jun 18, 2003 at 20:14 UTC
    I tried the POSIX::_exit() and it does finish much faster. It looks like not all destructors are called, but that may be all right for this application.

      Makes sense. Bottling out without cleaning up may seem harsh, but provided you ensure that you have saved anything that needs to be saved, flushed any buffers and closed any open files yourself, waiting for the GC to free off all those little bits of memory, just so that you can exit clean is pretty redundant.

      If this is your own build of perl, then you could try switching to a different malloc(), if its an AS pre-built, maybe whatever malloc they use will change or improve next time around.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller