Animation with high refresh rate

My project make animation at high refresh rate, to update my value i use:

BeingUpdateViews();
...
EndUpdateViews();
UpdateViews();
this function is called many time at each seconds and make rotation, coloring, displacement and resizing (mainly Meter and GoFigure object). My application seems to freeze when this function is called too many times but the CPU utilization still at 20% maximum. I do not know where the bottle neck is but if i analyse the performance in vs 2008 (i can send you the .vsp file of my performance analysis), it appears the call of UpdateViews(); take 90% of my CPU time with children (mainly in gdiplus.dll at 85%), my code itself do not take time at 0.02%.
My question:
1-Is UpdateViews(); have some kind of refresh limit you know, or can i make change to my code to be more efficient and still have huge refresh rate.
2-do you know why the CPU not jump at 100% (and stay below 20%)

BeginUpdateAllViews / UpdateAllViews suppresses Paint, but if your code is compute bound, then painting isn’t going to happen anyway…



> …is called many times a second…



how many times? and is this via a timer?

how many times?

-Around 25-30 times by second for now (when the problems begin to occurs).
and is this via a timer?
-not by a timer, by an external thread which call a delegate to put the refresh in the application UI thread.
What do you mean by code is compute bound, then paint isn't going to happen....my object in the GoView seems to move, displace, rotate always correctly only the user is unable to make action in the application (click a Gobutton in the GoView is impossible or click on other View (or frame not made with GoDiagram), close the GoView etc...). The GoView itself do not freeze and animation continue, only the whole application (including the Goview) not receive any user input. When the animation is finish and refresh rate slow down...user input come back to life and everything is fine until the next high refresh rate occurs!

What I was saying as the Begin/End Update really aren’t changing anything, since the code that is doing the animation has control until it exits… that’s when the update happens anyway.



Sounds like you are calling GoView.InvokeRequired and Invoke to get into the UI thread.



If you have a quad cpu, 20% CPU can be essentially compute bound on one of the 4 processors. So, one guess is you have hit the point where the animation is X milliseconds to complete, and your “do the animation” timer is happening more frequently than X milliseconds…