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

Performance problems

3 Answers 76 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
john
Top achievements
Rank 1
john asked on 16 May 2009, 02:59 PM
i am trying to load the elevation (ele tag) from a gpx file and display the values on a chart.
 my page takes 12min:12s to load. what is the problem? what i'm making wrong?
here is the file gpx: download 
and the code:
        string MyXmlFile = Server.MapPath(".\\Upload\\") + "Tour_2357.xml"
        DataSet ds = new DataSet(); 
        XmlDocument xmlDoc = new XmlDocument(); 
        xmlDoc.Load(MyXmlFile); 
        StringBuilder sb = new StringBuilder(); 
        ArrayList sbx=new ArrayList(); 
        XmlNodeList nodes = xmlDoc.GetElementsByTagName("ele"); 
        for (int i = 0; i < nodes.Count; i++) 
        { 
            sbx.Add(nodes.Item(i).ChildNodes[0].InnerText.ToString()); 
            sb.Append(nodes.Item(i).ChildNodes[0].InnerText); 
            sb.Append(Environment.NewLine); 
        } 
        XmlNodeList nodesX = xmlDoc.GetElementsByTagName("trkpt"); 
        latlbl.Text = nodesX.Item(0).Attributes["lat"].Value.ToString(); 
        lonlbl.Text = nodesX.Item(0).Attributes["lon"].Value.ToString(); 
        latlbl1.Text = nodesX.Item(nodesX.Count-1).Attributes["lat"].Value.ToString(); 
        lonlbl1.Text = nodesX.Item(nodesX.Count-1).Attributes["lon"].Value.ToString(); 
        TextBox1.Text = sb.ToString(); 
        RadChart1.DataSource = sbx.ToArray(); 
        RadChart1.DataBind(); 
        foreach (ChartSeries series in RadChart1.Series) 
        { 
            series.DefaultLabelValue = " "
            series.Appearance.PointMark.Visible = true
            foreach (ChartSeriesItem item in series.Items) 
            { 
                if (item.YValue > 0) 
                { 
                    item.ActiveRegion.Tooltip = item.YValue.ToString("F") + " m "
                } 
                else if (item.YValue == 0) 
                { 
                    item.ActiveRegion.Tooltip = item.YValue.ToString("F") + " m "
                } 
                else 
                { 
                    item.ActiveRegion.Tooltip = item.YValue.ToString("F") + " m "
                } 
            } 
            series.PlotArea.XAxis.Appearance.MajorGridLines.Visible = false
            series.PlotArea.XAxis.Appearance.MinorGridLines.Visible = false
            series.Appearance.LabelAppearance.RotationAngle = 45; 
            series.Appearance.LabelAppearance.Distance = 10; 
        } 

please help!

                   thanks anvanced!


3 Answers, 1 is accepted

Sort by
0
Dessy
Telerik team
answered on 19 May 2009, 11:57 AM

Hello John,

Delay that happens inside RadChart could be caused by loading a lot of data (like thousands of data points), having a large resolution for the chart image, or using computation intensive appearance features such as blurred shadows or complex gradients.
While the product was designed to be easily customizable and feature rich it does not cope well with extremely busy charts or rendering a lot of graphs on a single page. We are continually improving performance as we go but still the bottom line is that the control is targeted for casual situations which do not require a high performance solution. There is a trade off to make between high customization and high performance and we've gone the rich features path as it is what most of our customers are interested in.

Please accept my sincere apologies for the inconvenience caused.


Sincerely yours,

Dessy
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
john
Top achievements
Rank 1
answered on 21 May 2009, 10:09 AM
what settings can i disable , to improve the performance of the chart?
0
Ves
Telerik team
answered on 25 May 2009, 07:20 AM
Hello John,

As Dessy mentioned, avoiding complex gradients and blurred shadows might improve the performance. However, the main reason for the increased loading time in this case seems to be the large number of items. To avoid this you need to decrease the number of chart items -- you can try to filter the data sent to RadChart or combine several data items into one chart item using the average value.

Greetings,
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 (Obsolete)
Asked by
john
Top achievements
Rank 1
Answers by
Dessy
Telerik team
john
Top achievements
Rank 1
Ves
Telerik team
Share this question
or