4

That wonderful feeling when you modify a piece of code that you worked hard to get it down to run in 3 minutes flat take 8 minutes when you add a little fault tolerance to it 😑

Comments
  • 1
    Is it recursive somewhere?
    Is it a language similar to C#?
    I could help you there as I had this issue as well.
  • 1
    @filthyranter it's python. I knew it was going to be slower when I made the change just didn't expect a if statement to make it take so much longer. I got a few more tricks to try optimizing it a bit more.
  • 1
    @icycrash Try splitting up prechecks (user input, etc.) and actual execution using functions and moving all checks possible to the prechecks seperate function.

    If it's recursive, that is.
  • 0
    Optimizing its fun! 😊
    No sarcasm.
  • 1
    @filthyranter There is no user input. It's very simple script. It pulls raw data from one location filters out to push the needed parts to another location. For 1700 individual files. The biggest slow down is printing the output for each file which I had set up during testing.
Add Comment