This project is read-only.

Reducing CPU consumption

Jun 16, 2008 at 2:54 PM
After reading the following post from Marlon Grech, I made a little hack on ElementFlow.cs to add a property so that one could tune the timeline framerate.  I played around with numerous framerates and between 15-20 was perfectly fine for what I was doing.

Here's the quick and dirty hack -

 #region Properties

        public int FrameRate
            get { return (int)GetValue(FrameRateProperty); }
            set { SetValue(FrameRateProperty, value); }


 #region Dependency Properties

        public static readonly DependencyProperty FrameRateProperty =
            DependencyProperty.Register("FrameRate", typeof(int), typeof(ElementFlow),
            new PropertyMetadata(60, OnFrameRateChanged));


 #region DependencyProperty PropertyChange Callbacks

        private static void OnFrameRateChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
                new FrameworkPropertyMetadata { DefaultValue = e.NewValue }


Jun 16, 2008 at 8:25 PM
Thanks Ricky...this should make it to the next update !