I built my first Perl application that parses XML and creates a website of over 1000 pages from that XML. The build process is really fast. As a last step, I wanted to take all the generated files and copy them to a new folder and then zip them up for another process to pick up and FTP to another location.
I had trouble getting a recursive copy of everything, and inquired here at perlmonks, where someone suggested, since I was using ActiveState, to use the ActiveState::Handy::cp_tree module.
I installed it and ran it local. It copied all 1000 files to another directory (in the same root folder of the project, same hard drive, etc) in maybe a minute. Great so far!
I took the entire Perl application and put it on a network box so other people can build the site. I mapped a drive (windows of course) to the folder on the network, and executed the program. The entire build process was as fast, if not a little faster than on my laptop.
But...when it came time to execute the last section of the code, where I use cp_tree to copy the newly generated files to an "out" folder, the process completely bogs down.
I can watch the out folder slowly fill up with files, about 1 per second or something like that. Now, the simple copy command is taking about 10-12 minutes from start to finish, whereas on my laptop, it only take about 2 minutes.
Any clue what could be going on? Does Perl behave differently if you invoke it from a mapped drive or network resource? Why would one section of code fly on one machine and be so slow, impossibly slow, on another?
Thanks for any help. I'm brand new to Perl and this is my first project with it.
Thanks...
Doug
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.