3 ms·
I remember one time, there was code that took 3 hours to run. Then printing the output took another 3 hours. A huge problem was that it printed out a stack of o
by France_is_bacon 5y ago
I remember one time, there was code that took 3 hours to run. Then printing the output took another 3 hours. A huge problem was that it printed out a stack of output about 3 feet high, and if the printout jammed, as was often the case, you had to start all over, even if it was 10 pages short of completion of the print job. Another 6 hours. Another printing error, yet another 6 hours. So, as you probably can see, it could take 18 hours or more to get a correct printout.
I took one look at the code, and changed it. It then took about literally 5 seconds to run the code. Then I added some code that would allow the entry of a page number, and the users could enter that page number and print from that page. So, it would then take always a maximum of 3 hours to print out the output. Then I told the night operator to run this program for the operations department at midnight. So, as far as the operations department was concerned, that brought the time down to zero, and the printouts were on everyone's desk when they walked in the door in the morning.
The manager of that specific department literally came up to me after it was rolled out and was crying hard, and hugged me for about a minute, crying the whole time, as her job was on the line, no fault of her own, because she couldn't get the job done, because she couldn't get the printouts.
There was no way that the most powerful computer in the world that would have got that code to run any faster, because of the horrible way it was written. Going from maybe 18 hours to zero time, on the same exact computer....what is that improvement in percentage anyways? What's 18 hours/0 hours? haha...
- tomjen3 5y agoInteresting. My first thought was to print to a PDF, then print the PDF, since you can restart it from whatever page you want, and you don't have to restart it. You solve the actual problem, but this would have been quicker.
- France_is_bacon 5y agoWell, it was more complicated than that, and situational, as things usually are.