I have a strange performance issue on WPF2007 vol2 with xamDataGrid.
If I assign an untyped DataSet with just 40 records to a grid, and the grid previously has only 1 or 2 rows displayed, then it takes almost 2 seconds to display the grid with the new data. But if I now assign a dataset with 1,000 records to the same grid which is now displaying a full page of data, it displays in 0.1 seconds! It seems that if the xamDataGrid has a largely empty screen performance is much slower when you then display a full screen of data.
Is there a solution to this problem ?
I also find grouping takes several seconds, as does expanding a hierarchical node. Winforms, on the other hand, is instant - and this is progress ?
I think the issue might be more related to resizing. I find if a grid is initially small, then resized large, the initial resize is slow and jerky as more rows/columns become visible. I have attached the sample solution demonstrating this - see SlowResizeOfGrid.zip. This is using the most recent 7.2 release.
Thanks,
Andy.
RecordContainerGenerationMode="LazyLoad" improves matters significantly.
The resize issue the demo app shows isn't showing the true extent of the resizing performance problem that I'm experiencing. In reality, I find it's taking 7 seconds to resize a window that contains two XamDataGrids. The window is split into 4 quarters via a 2x2 Grid and 2 GridSplitters, with XamDataGrids in the top 2 quarters, and using SandDock for XBAP docking support. I'm not sure why, but the data I'm getting from the database seems much slower to resize - possibly datatypes, number of columns/rows ? Haven't been able to pin that down yet.
But I think it's the issue you describe. I need to load 10 - 20,000 rows of data, so user can do grouping/filtering/summing etc. as they like. With 20,000 records, the default settings give good load & sort performance, but fairly poor performance when docking/resizing - up to 7 seconds I found with 2 grids present. RecordContainerGenerationMode="LazyLoad" gave vastly better docking/resizing speeds (less than a second), although sorting was marginally slower - about 1 second compared to approx 0.5 second. I suppose it's a question of trade-offs to get the best overall user-experience. I found PreLoad killed performance, taking around 40 seconds to sort.
Is it possible to specify a minimum number of row/cell elements to create up front - e.g. create say 100 rows ? Or does that happen automatically with LazyLoad as the first page is displayed anyway ?
Many thanks,Andy.
Hello,
Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.
Looking forward for your reply.
We seem to be having the same performance issues with the XamDataGrid in 11.2 with the latest service release. We have narrowed the issue down to when we have AutoFit set to True. When loading or scrolling the grid you can see it lagging and moving very slow when AutoFit is set to True and when we turn AutoFit off it has better performance.
We are using version 10.3 in another version of our application and we are not seeing these performance issues in that version.
Has something changed from version 10.3 that would cause this?
Also note that we tried upgrading to the latest control release 12.2 and still see the same performance issues.
Please advise.
I am having a very similar issue with the performance of the grid, I have tried, LazyLoad to no avail, when I run from VS2008 it runs with acceptable performance, but as soon as I deploy and run the deployed version, performance is bad, yet I have another grid, that performs very well. The main difference between the two, is the data being displayed, the slow grid, shows mostly strings, where as the fast screen shows mostly numbers, I wonder if this has any bearing on the problem, also does AutoFit make a difference in the performance of the grid ?
Please find attached an XBAP project that reproduces this. (sorry for the delay!)
The strange thing is that it only takes 10 seconds when debugging the XBAP through visual studio. If I publish the XBAP then run it directly from IE, then it only takes 2 seconds. A standalone WPF .exe seems to always take 2 seconds whether debugging or not. I wondered whether CAS Code Access Security checks were the culprit, but probably not, as running an XBAP through IE still does CAS checks. So may just be an XBAP debugging issue ?