Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^5: Poorly written script

by amarquis (Curate)
on Feb 11, 2008 at 15:01 UTC ( #667391=note: print w/replies, xml ) Need Help??

in reply to Re^4: Poorly written script
in thread Poorly written script

I'm sure a more experienced monk will tackle larger issues better than I can (I think your biggest issue might be multiple similar iterations over data that could be done in one loop, but I didn't examine it closely).

I've found in the past that I can get decent speed gains with very little effort by replacing many repeated print statements with a response string that I keep adding to statement by statement and eventually print.

Again, in this case you have problems to tackle that overshadow any slowness from repeated prints, but it is food for thought for your other pages/scripts.

Edit: Graff's post above is great. Besides the speed benefit of going from "do file1, do file2, do file3, etc." to a single pass or a loop is that it will be much easier to modify/extend your code.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667391]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2018-12-11 03:22 GMT
Find Nodes?
    Voting Booth?
    How many stories does it take before you've heard them all?

    Results (52 votes). Check out past polls.

    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!