3 ms·
A batch run of only a few thousand items was running all night long, rarely finishing and causing all kinds of problems when people logged in in the morning. T
by edw519 17y ago
A batch run of only a few thousand items was running all night long, rarely finishing and causing all kinds of problems when people logged in in the morning. The users had been complaining about this for years.
I was given the ticket and found a "SLEEP 10" (causing a 10 second pause for each item) in the 10 year old BASIC code, put in by the original programmer for debugging purposes, and never removed before it was promoted.
I removed the "SLEEP 10" and run time went from 12 hours to 23 seconds.
The users loved me, but my boss was not pleased. He said, "You should have changed it to a SLEEP 5 so we had something else to give them the next time they complained."
- bendtheblock 17y agoPerhaps it was intentional on the original programmer's part... but he never got round to reducing the sleep time - http://thedailywtf.com/Articles/The-Speedup-Loop.aspx http://thedailywtf.com/Articles/The-Speedup-Loop.aspx
- astangl 17y agoReminds me of back in the old days writing integer assembly language (and later) C apps for microcomputers. As FPUs started to become available, users complained they spent all this money on an FPU and got no speed improvement. I half-seriously suggested adding FPU detection and intentional delay loops if no FPU was present.