Problem: When few trends were opened in an application, no performance issue were noticed. But if ten or more trends would be opened each trend having around seven traces in average, the application would hang.
Analysis: On analysis it was noticed that the CPU load would be high leading to the application hang.
Analysis: On analysis it was noticed that the CPU load would be high leading to the application hang.
- On digging further, the trend drawing event would consume most of the CPU. Hence the drawing of the traces was reviewed. It was noticed that once the traces reach till the end of X axis, its logic had some flaw where for each trend traces were being drawn again instead of removing or hiding the old points and joining the end points incrementally.
- The above fix would solve half of the problem. Then it was further optimized by suspending the paint events of the trends that were not in view for some time. The drawing event will resume once the trend display is viewed again.
Comments
Post a Comment