Slow chartmap template load
Slow chartmap template load
Once I save a template from a chartmap, when I load it it takes too long.
In the attached sample, there are two charts and two textbox.
The first chart is generated from a shp file and the first textbox shows the time taken to load it.
The second chart is generated from the saved template of the first one and second textbox shows the time taken to load it.
The results I found here were:
Time to load from shp: 74.0042 (milliseconds)
Time to load from stream: 5231.2992 (milliseconds)
Is this fine? Am I doing something wrong? Why is it so different? We are having serious performance problems because of this and would appreciate any help.
I wasn't able to upload the shp file because of its file size, is there any alternative so you can test this with same shp?
Thanks!
In the attached sample, there are two charts and two textbox.
The first chart is generated from a shp file and the first textbox shows the time taken to load it.
The second chart is generated from the saved template of the first one and second textbox shows the time taken to load it.
The results I found here were:
Time to load from shp: 74.0042 (milliseconds)
Time to load from stream: 5231.2992 (milliseconds)
Is this fine? Am I doing something wrong? Why is it so different? We are having serious performance problems because of this and would appreciate any help.
I wasn't able to upload the shp file because of its file size, is there any alternative so you can test this with same shp?
Thanks!
- Attachments
-
- Sample.zip
- (3.79 KiB) Downloaded 711 times
Re: Slow chartmap template load
Hello Hermes,
You can upload your project in the upload page. On the other hand, I can try to reproduce your problem using your code and it doesn't compile for me. Please, try to arrange a simple project that we can run "as-is" here, because we can reproduce your problem.
Thanks,
You can upload your project in the upload page. On the other hand, I can try to reproduce your problem using your code and it doesn't compile for me. Please, try to arrange a simple project that we can run "as-is" here, because we can reproduce your problem.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
I uploaded TeeChartMap.zip with name Johann and mail jperez@narthex.com.uy (I guess that's how you can identify the file as it didn't return any other identifier).
The content of the file is a VS2010 web project with the page described before and the shp file used.
I will gladly give you any other information you need.
Thanks
The content of the file is a VS2010 web project with the page described before and the shp file used.
I will gladly give you any other information you need.
Thanks
Re: Slow chartmap template load
Hello Hermes,
Thanks for your project, we can reproduce your problem here and we are working to find an answer for this behavior.
Thanks,
Thanks for your project, we can reproduce your problem here and we are working to find an answer for this behavior.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
Hello Hermes,
We have made a solution for you, where increase the performance of your application. We have done three modifications that change the performances of your webChart.
1.- Not include data: WebChart1.Chart.Export.Template.IncludeData = false;
2.- Add the Shapes of Map in the PolygonList: Steema.TeeChart.Styles.PolygonList pList = lMapa.Shapes;
3.- Add the Shapes you have saved in pList to the Series of WebChart2: ((Map)(WebChart2.Chart.Series[0])).Shapes = pList;
You can test it using next code:
Can you tell us if previous code improve your performance? On the other hand, you need know we have a problem with serialization and WebChart. We are working to fix it for upcoming versions of TeeChartFor.Net.
Thanks,
We have made a solution for you, where increase the performance of your application. We have done three modifications that change the performances of your webChart.
1.- Not include data: WebChart1.Chart.Export.Template.IncludeData = false;
2.- Add the Shapes of Map in the PolygonList: Steema.TeeChart.Styles.PolygonList pList = lMapa.Shapes;
3.- Add the Shapes you have saved in pList to the Series of WebChart2: ((Map)(WebChart2.Chart.Series[0])).Shapes = pList;
You can test it using next code:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
DateTime lTime = DateTime.Now;
TeeSHP lTeeSHP = new TeeSHP(@"J:\Sandra\brossa\TeeChartMap\TeeChartMap\");
Map lMapa = new Map();
WebChart1.Chart.Series.Add(lMapa);
//Steema.TeeChart.Styles.Line line = new Line(WebChart1.Chart);
//line.FillSampleValues();
WebChart1.TempChart = Steema.TeeChart.Web.TempChartStyle.Session;
lTeeSHP.LoadMap(lMapa, "southamerica_adm0.shp");
TextBox1.Text = (DateTime.Now - lTime).TotalMilliseconds.ToString();
WebChart2.Chart.AutoRepaint = false;
var lStream = new MemoryStream();
WebChart1.Chart.Export.Template.IncludeData = false;
WebChart1.Chart.Export.Template.Save(lStream);
Steema.TeeChart.Styles.PolygonList pList = lMapa.Shapes;
lStream.Position = 0;
lTime = DateTime.Now;
WebChart2.Chart.Import.Template.Load(lStream);
((Map)(WebChart2.Chart.Series[0])).Shapes = pList;
WebChart2.TempChart = Steema.TeeChart.Web.TempChartStyle.Session;
TextBox2.Text = (DateTime.Now - lTime).TotalMilliseconds.ToString();
}
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
As this serialization is part of a bigger code where lots of other controls are being serialized this solution is not adecuate for us. Have you had any progress on fixing the issue?
Thanks!
Thanks!
Re: Slow chartmap template load
Hello Hermes,
We were looking to include elements of the test solution we sent you into the TeeChart product itself. From a performance point of view your feedback would be useful to help us understand if we are reaching the objective in that respect.
Thanks,
We were looking to include elements of the test solution we sent you into the TeeChart product itself. From a performance point of view your feedback would be useful to help us understand if we are reaching the objective in that respect.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
Our expectation is that the time it takes to load the chart from the stream is in the same order as it takes to loading it in the first time from the shp. I guess, taking the sample into account, that 70,100 or 200 ms would be acceptable.
Re: Slow chartmap template load
Hello Hermes,
Sorry for the delay. We are adding our workaround in the source code and it already be implemented in next maintenance release of TeeChartFor.Net. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
Sorry for the delay. We are adding our workaround in the source code and it already be implemented in next maintenance release of TeeChartFor.Net. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
Thanks! Is there an approximate date when this will be available?
Re: Slow chartmap template load
Hello Hermes,
The next maintenance release would be published in few weeks, but I can not provide you the concretly date. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
The next maintenance release would be published in few weeks, but I can not provide you the concretly date. I recommend you to be aware at this forum, our RSS news feed, twitter and facebook accounts for new release announcements and what's implemented on them.
Thanks,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
Was a solution for this included in the newest release 4.1.2012.09280? I cannot find it in the documentation.
thank you
thank you
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Slow chartmap template load
Hi Hermes,
According to what Sandra posted here I'd assume that this has been included even not documented. Have you tried if the new version solves the problem at your end?
Thanks in advance.
According to what Sandra posted here I'd assume that this has been included even not documented. Have you tried if the new version solves the problem at your end?
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Slow chartmap template load
Hi Hermes,
As an update, I can confirm that the solution has been implemented in the current version. You should set IncludeData=false as in the example below:
As an update, I can confirm that the solution has been implemented in the current version. You should set IncludeData=false as in the example below:
Code: Select all
protected void Page_Load(object sender, EventArgs e)
{
DateTime lTime = DateTime.Now;
TeeSHP lTeeSHP = new TeeSHP(@"C:\Users\Christopher Ireland\Downloads\TeeChartMap\TeeChartMap\");
Map lMapa = new Map();
//lMapa.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value;
//lMapa.Marks.Visible = true;
WebChart1.Chart.Series.Add(lMapa);
WebChart1.TempChart =
Steema.TeeChart.Web.TempChartStyle.Session;
lTeeSHP.LoadMap(lMapa, "southamerica_adm0.shp");
TextBox1.Text = (DateTime.Now - lTime).TotalMilliseconds.ToString();
var lStream = new MemoryStream();
WebChart1.Chart.Export.Template.IncludeData = false;
WebChart1.Chart.Export.Template.Save(lStream);
lStream.Position = 0;
lTime = DateTime.Now;
WebChart2.Chart.Import.Template.Load(lStream);
lMapa = WebChart2.Chart[0] as Map;
lTeeSHP.LoadMap(lMapa, "southamerica_adm0.shp");
WebChart2.TempChart =
Steema.TeeChart.Web.TempChartStyle.Session;
TextBox2.Text = (DateTime.Now - lTime).TotalMilliseconds.ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Slow chartmap template load
As I had said before, my solution need to serialize the chart WITH the data. For it, IncludeData = false it is not a solution for me. Have you any plan to optimize this or add a method to serialize and deserialize to a stream the hole control?
thanks
thanks