Custom Virtual Panel to hold huge data


Recently, I was facing performance issue while working with huge data. I need to bind those data inside a panel as Custom User Control &... - Article authored by Kunal Chowdhury on .

Recently, I was facing performance issue while working with huge data. I need to bind those data inside a panel as Custom User Control & want to change the properties multiple times in a second. When I used less no's of data it was working fine, but, when I tried with more no of data, my application starts crying. It was a real pain to the application to start while loading those records & unfortunately I didn’t get any solution to that.

After doing a lot of analysis with VirtualizingStackPanel concept that I shared in my previous post “What is Virtualizing StackPanel?” didn’t solve my problem which I was facing due to huge no of data.

Later, I found a very good post (“WPF: Adventures in Virtualization by Mike Taulty”) shared by Dr. WPF on implementing custom Virtual Panel, which actually resolved my problem.

Here you will find some very good articles on step-by-step implementation of Virtual Panel:

Those are very nice articles to implement the custom virtual panel step-by-step & after implementation of this panel, I noticed a huge performance improvement in my application. This really helped me while working with a huge records.

Now, come to the basic concept of this virtual panel. What it actually does. It loads all the records in a different thread & populate them in the UI as much as records that can be viewable in the screen. While scrolling, it actually creates new object of the elements by virtualizing the existing elements. So, only those objects will be in the memory which are available in the screen. The rest will go for a cleanup process. Hence, improving the performance more & more…. depending on the visible UI elements.

See a nice example in this location: http://blogs.msdn.com/jgoldb/attachment/8116217.ashx

Have a question? Or, a comment? Let's Discuss it below...

dhgate

Thank you for visiting our website!

We value your engagement and would love to hear your thoughts. Don't forget to leave a comment below to share your feedback, opinions, or questions.

We believe in fostering an interactive and inclusive community, and your comments play a crucial role in creating that environment.