This is a migrated thread and some comments may be shown as answers.

Big problems with big numbers

4 Answers 88 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Marcus
Top achievements
Rank 1
Marcus asked on 17 Apr 2009, 04:31 PM
I'm binding a simple line chart to 8 points. When the X values of the points are around 10,000, there's no problem. When the values are around 100,000, there's a slight delay (~1 second on my box). Increasing the values to around 1,000,000 results in a ~12 second delay. Going higher increases the delay proportionately. Anything I can do to prevent this (other than dividing my values by 1,000)?

4 Answers, 1 is accepted

Sort by
0
Marcus
Top achievements
Rank 1
answered on 17 Apr 2009, 05:41 PM
I've found the cause of the problem. It has to do with using an ObservableCollection. When items are added to the collection that have large numbers, the performance dies. Here's some code to reproduce:

 
    public partial class TestPage : UserControl 
    { 
        public TestPage() 
        { 
            InitializeComponent(); 
 
            ObservableCollection<TestObject> TestObjectCollection = new ObservableCollection<TestObject>(); 
 
            SeriesMapping SeriesMapping1 = new SeriesMapping(); 
            SeriesMapping1.ItemMappings.Add(new ItemMapping("TestValue", DataPointMember.YValue)); 
            SeriesMapping1.SeriesDefinition = new LineSeriesDefinition(); 
            TestChart.SeriesMappings.Add(SeriesMapping1); 
            TestChart.ItemsSource = TestObjectCollection; 
 
            // This works just fine: 
            TestObjectCollection.Add(new TestObject() { TestValue = 10000 }); 
            TestObjectCollection.Add(new TestObject() { TestValue = 20000 }); 
            TestObjectCollection.Add(new TestObject() { TestValue = 30000 }); 
 
            // This takes a while to render: 
            /*
            TestObjectCollection.Add(new TestObject() { TestValue = 10000000 });
            TestObjectCollection.Add(new TestObject() { TestValue = 20000000 });
            TestObjectCollection.Add(new TestObject() { TestValue = 30000000 });
            */ 
        } 
    } 
 
    public class TestObject 
    { 
        public double TestValue { getset; } 
    } 

This appears to afflict Lists as well, but not nearly as badly. The best work-around I've found is to bind to a List and display your results in millions (so you're binding to 1.35 instead of 1,350,000, for example).

Another symptom I found was that a StackedBarSeries would fail to render at all (other types of Series rendered fine after the delay), in case anyone else runs into this problem.
0
Ves
Telerik team
answered on 21 Apr 2009, 04:52 PM
Hello Marcus,

Thanks for notifying us about these issues. Our developers are already investigating them so that the fix is included in the next release of the control. Your Telerik points have been updated.

Best regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brandon Zeider
Top achievements
Rank 1
answered on 24 Aug 2009, 03:31 PM
Has this issue been resolved?
0
Ves
Telerik team
answered on 26 Aug 2009, 07:47 AM
Hi Brandon,

Yes, this has been fixed. Please, check the latest version - 2009 Q2 SP1.

Regards,
Ves
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Chart
Asked by
Marcus
Top achievements
Rank 1
Answers by
Marcus
Top achievements
Rank 1
Ves
Telerik team
Brandon Zeider
Top achievements
Rank 1
Share this question
or