Performance problems

Thread is closed for posting
4 posts, 0 answers
  1. john
    john avatar
    2 posts
    Member since:
    May 2009

    Posted 16 May 2009 Link to this post

    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!


  2. Dessy
    Admin
    Dessy avatar
    73 posts

    Posted 19 May 2009 Link to this post

    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.
  3. john
    john avatar
    2 posts
    Member since:
    May 2009

    Posted 21 May 2009 Link to this post

    what settings can i disable , to improve the performance of the chart?
  4. Ves
    Admin
    Ves avatar
    2916 posts

    Posted 25 May 2009 Link to this post

    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.
Back to Top