Weather Message 3.0 is internally different from Weather Message 2.x. The program were practically rewritten for microsoft.net 2005. I have spent countless hours reviewing the code for bottlenecks and ways to increase performance, which reduces CPU utilization.
Changes this weekend have resulted in some optimizations that give a 50% time improvement in some routines. (This resulted in a few milliseconds of improvement) There were also changes that reduced the per message internal memory requirement.
When it seems that I am not turning out alot of new changes, I am still at work on the software. The microsoft.net 2005 environment is new to all programmers. Because of that, I have to double check the code. It has to work, then when it works, I want to determine if there a faster way to get the job done.
A programmer can write code that works, but uses all of your CPU cycles. My goal has always been to write good code that is highly efficient. I guess that goes back to my days of writing code for computers that had 8,000 bytes of memory. Having access to mega-bytes or giga-bytes of memory and giga-hertz cpus is no excuse for poorly written code.
I recently spent 4 hours rewriting the serial ingest data processing routine. The change resulted in the routine being event driven which was supposed to be a good thing. After the changes, the program consumed twice the cpu cycles. I went back to the original code that worked and provided the lowest cpu usage.
Optimization of the Weather Message code will continue for some time as I learn the best ways of accomplishing tasks.
As a side note to optimization, I will start converting the configuration files of other applications to XML. Although there is a small performance penalty for using XML, this standardization is worth the cost.
Sunday, October 22, 2006
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment