This project is read-only.

SprocketControl performance when is not visible

Nov 5, 2011 at 2:50 PM

First of all, thanks for sharing this spinner control.

Running this control on my application i noticed that event when control is not visible (IsVisible=false) and it is indeterminate (IsIndeterminate=True) the entire render code keeps running for ever.

This behavior consumes some processor performance, something about 7-10%. So after noticed i did a small change in code for performance improvement that only enable render timer when IsVisible=True.

When the control has do make a decision to enable rendering timer, the method below is called. Beyond that i need to listen IsVisibleChanged event as well. Works great and save processor time.

private void StartStop() { if (IsIndeterminate && IsVisible) { // Start the renderTimer Start(); } else { // Stop the renderTimer Stop(); InvalidateVisual(); } }

 

Sry for my pooooorrrr english.

Nov 10, 2011 at 9:57 AM

Hi,

   Thanks for the update.

   Even I noticed that too. I will be fixing it and updating the library soon.

   Cheers,

   Ratish