in reply to Very slow ActiveState::Handy::cp_tree problem

It's more likely that you are hitting performance problems due to shunting files across the network than that Perl is behaving differently in the two contexts. It may be that ActiveState::Handy::cp_tree is doing more work across the network than it need. It would be interesting to benchmark something like xcopy doing the same job.


Perl is environmentally friendly - it saves trees
  • Comment on Re: Very slow ActiveState::Handy::cp_tree problem

Replies are listed 'Best First'.
Re^2: Very slow ActiveState::Handy::cp_tree problem
by dbonneville (Acolyte) on Oct 15, 2007 at 19:12 UTC
    So if I run the script as accessed through a mapped drive (Windows) it will run much slower than if I telnet into the box and run the script?

    I looked up xcopy - sorry I'm a newb still - and noticed in cpan it was under something called geotiger. Is xcopy part of the ActiveState Perl I have running (latest version)?

    Thanks,

    Doug

      xcopy is a Windows command line file copy tool. I was suggesting that a sanity check for the performance of the code would be to manually do the same copy task using Windows system tools to check that the time to do to raw copy was the issue and not some overhead in your script.

      Running the script using a mapped drive implies that the local machine is doing the work and that all the data it manipulates moves across your network connection. Running the script using telnet implies that the script runs on the remote box and all the data is manipulated locally to the remote box. It is the overhead of shunting large amounts of data across the network that I suspect is causing your issue.


      Perl is environmentally friendly - it saves trees
        Oh...the box I mapped a drive to is Unix. I'd have to find the unix command for recursive copying. I'll try that.