| Module Info
| Add a review of Perf-Stopwatch
Rating my own module, because I have a story to tell...
This module was implemented to be easily thrown into any portion of an existing script to diagnose where any delays couldbe removed. We used it on a multi-file uploading, parsing, and database inserting web page that was taking over 100 seconds to complete an 8-file submission. We didnt have a good judgement to tell which part of the process (uploading, parsing, or database) was causing the greatest hinderance in the overall process. After adding more Stopwatches and timing intervals in various loops and subroutine calls, we were able to find exactly which functions were causing the majority of the holdup; 2 database (PLSQL) calls and 1 parsing subroutine.
We realized then that we forgot to add some indices on the tables used by the PLSQL function and reduced the overhead within the parsing subroutine and dropped the previously 100+ second delay to 11 seconds! The few timing lines and debug print statements were easily removed and pushed forward into our production servers by one person all within an hour of completing the Stopwatch module. It might've taken several people days to scan every database table touched, every portion of the parsing process, and file-uploading logic.