I'm using 2009 vol 2 xamchart barchart. I'm creating a rotate3d transform that rotates the chart with the mouse. There are a mere 25 columns and 25 series (i'm plotting pixel intensities in an x,y region). The chart initializes resonably fast. The rotate transform is barely acceptable - somewhat choppy. If I increase the datapoints to say a 35 by 35 region, it takes seconds for the chart to redisplay after the rotate3d transform is changed. It's unusable. The chart is the same size, only more datapoints - why would the rotate transform perform worse? I'm not recomputing anything other than a new transform, and I have also tried enablerefresh = false. Any idea what might be going on and how to resolve? Seems like the chart is doing something behind the scenes...
Thanks in advance.
To better determine what is going on with performance, I would need to reproduce the same behavior. Is this something you could replicate with a small sample WPF project?
Thanks!
Yes. I've duplicated it in the attached zipped project.
I initialize with 25 x 25. You hold the left mouse button down and move the mouse and the chart rotates. You will see it a bit choppy, but ok. You can increase the x and y via the text boxes and click build data button, which will build a new datatable and bind it to the grid. You will see the rotation performance degrades significantly.
Thanks for the sample! I had some engineers who work on the XamChart look at it. Here is one idea for optimizing your code:
It might improve things to batch these updates to once every 50 milliseconds (using a DispatcherTimer) instead of applying them every time the MouseMove event is raised.
Does this make sense to you? Using a DispatcherTimer makes your code work on a thread. Let me know if you'd like more assistance on this case.
Thanks for looking into this. I tried the dispatcher timer; it does not help. I don't think it's a threading issue.
This line in the sample code simply takes a long time to execute. The more data that is bound to the chart, the longer it takes to execute.
IntensityChart.Transform3D = new System.Windows.Media.Media3D.RotateTransform3D(oQR3D);
The suggestion to use a DispatcherTimer is to limit the operations to once every 50 milliseconds. Currently, the MouseMove event gets raised more frequently than this. Using your sample, it looks like the MouseMove event is being raised about every 10 milliseconds while the mouse is moving. With a timer you have a sure-fire way to slow down the operations being executed.
Let me know if this helps.
Curtis,
I have attached a modified version of the chart rotate3D issue that does not have any mouse events in it. It should clearly demonstrate the issue I am reporting regarding peformance degridation during the assignment of a rotate3dtransform to the chart as the amount of data in the chart increases.
To use to program, type in x, y values, then press build data. this will generate a chart with new data. Then press Rotate3D to compute a new rotation and assign it to the chart. With a mere 100 x 100 for x and Y, it takes many many seconds for the rotatetransform3D assignment to complete.
Please let me know if you have further questions. Thanks a lot!
I've asked engineering to look into this. They suggested that I report this as a bug in order to ensure that we improve performance with an upcoming release. Until then, I am also looking into seeing if there is a suitable work-around to help you with this issue now.
Thank you!
OK, thanks a lot.
Robert,
Our developers have completed their review of the logged issue 57236, and determined that the workaround that was provided earlier is currently the best solution.
Thank you,Sam
I have logged this behavior in our issue tracking system with an issue ID of 57236. If some other resolution is reached, I will contact you with this information.
You can view the status of all development issues connected to this case from the "Development Issues" tab, when viewing this case on the "My Support Requests" page of our website.
Sincerely,SamDeveloper Support EngineerInfragisticswww.infragistics.com/support
Thanks for the quick response. I agree, this modification has improved the rotate transform performance significantly. Thanks a lot!
I received a suggestion from our development team that modifying the transform object instead of resetting the property on the chart, made performance improvement, such as:
From:
To:
oRT3D.Rotation = oQR3D;
This has improved the performance significantly as I have tested it, and I will also submit this request in our internal issue tracking system to be reviewed for further improvement.
Thank you,
Sam