This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi There, We found a problem for the updating the DataTable if the DataTable has more than 40 columns and more than 200 records. Here are the scenery that can reproduce the problem: 1) Binding the DataTable to the DataGrid with the table contains 200 records and 40 columns initially 2) Create a working thread that is updating the values of or add records to the DataTable (this working thread is always busy though) Every time, when the DataTable is updated, the UI is not very responsive. (sometimes, it takes more than 10 seconds) Doing the same thing and use Windows Form's DataGridView, we cannot see any delay in the UI. Can you guys improve the performance? Since most time we are going to have more than 1000 records, and our beta test customers are extremely unhappy about it. Thanks Gordon |
|
|
Hello Gordon It will take some time to improve the performance of this. I'll let you know when this is available. One thing to remember is that the Auto-size and star-size column features can slow things down. So if you are using these features, you may want to stick to normal-sized columns for now. Jason Fauchelle |
|
|
Thanks Jason. I am looking forward to the improvement. For the situation I have I did use the normal column size since there are so many columns, the star or auto is not making sense anymore. Gordon |
|
|
Any progress on this? Gordon |
|
|
Not yet. This may be postponed until after the WPF Elements 6.0 release. I'll let you know how it goes. Jason Fauchelle |
|
|
If it can be improved by the end of March, it will be helpful... |
|
|
Hello Gordon I've been looking into the performance of the DataGrid recently but have not yet found any areas where it can be significantly improved. I created a DataGrid that binds to a DataTable that starts out with 200 rows and 40 columns. I put this full screen so the DataGrid displays over 1300 cells at once. I setup a BackgroundWorker to add 10 rows every second. The UI lags a bit when rapidly moving the scroll bar, but there isn't a significant performance impact. Could you please send a simple repro project that demonstrates a DataGrid with a large data source that is being updated by a worker thread in a way that the UI stops responding up to 10 seconds. From this I'll easily be able to track down all the performance issues. Jason Fauchelle |
|
|
Hi Jason, Thanks for trying it out. If you can try adding some rows and at the same time if you can updating the cells for exsiting rows. (i.e. add 20 rows and update about 50 cells for existing rows / second, which is what we have done in our program ). At same time try to move the window with the data table in it, you may see the lag. Thanks Gordon |
|
|
Hello Gordon Apologies for the performance improvements taking so long, I have been looking into it for a while but haven't reproduced a way to lock up the UI significantly. I roughly doubled what you suggested by adding 40 rows and changing 80 cells per second, but scrolling, moving or resizing the window only show lags of less than a second. Although this lag is not significant, I looked into improving this but found that the call count of heavy algorithms is as tight as possible, and the points where the performance is hurting the most is within standard WPF methods or properties which are required for the DataGrid to function. As these are parts of the WPF framework, we can not modify them and would be difficult to work around using them. I'm sure there is still something that can be done to improve the performance in your scenario, but I'd really need a repro project to find out exactly where the performance is failing in your application. It could be the combination of all sorts of things such as the usage of grouping, paging, sorting or hierarchical data as well as column settings and custom templates. Jason Fauchelle |
|