I think it is also important to mention that there are tools that can analyze code & running programs to tell you where it is spending most of its time. That’s helps identify places where can optimize the code. As an example, I had program that dealt with database records that had a date. And every time to display a record we needed a formatter to make the date look as desired. Using a profiling tool it showed doing that was actually the bulk of processing time used by the app. For each record it created a formatter object which turned out to be a very expensive operation. I fixed it by creating one at the beginning of the app and reusing it for each record. Made the program 90% faster. Optimized!
Latest Answers