- presentation of thousands of elements,
- low memory consumption,
- fully responsive UI,
- real-time interaction.
Showing thousands of elements on the screen is not a problem but if you want to minimize memory consumption and you don't want to wait ages for loading all elements (fully responsive UI) you have to run this process asynchronously and visualize only necessary elements. For detecting elements belonging to my visibility area (in this particular case screen + 25% margin) I decided to use Quadtree algorithm. On the pictures below you can find ZoomBoxes with all elements (left hand side) and just necessary elements detected by Quadtree (right hand side). ZoomBoxes on the left hand side contain simplified form of nodes (just nodes no connections, about 15k ellipses) loaded upfront to help users to find themselves on this huge canvas 66000 x 66000 pixels.
Dude, you rock :)
ReplyDeleteIs there any code to be shared? I'd like to know more details on implementing similar behavior and also using same kind of animations
My implementation is not ready to be shared :-) but I can redirect you to the source which became my inspiration http://blogs.msdn.com/b/jgoldb/archive/2008/03/08/performant-virtualized-wpf-canvas.aspx
ReplyDeleteWhen will u be able to share it?
DeleteThanks
Thanks! I've noticed that article :) Did you do that using WPF 4?
ReplyDeleteThere are not a lot of new things but I decided to use PLINQ in few places and I was thinking about using Cached Composition for reach Node representation.
ReplyDeleteHi, how about releasing the code?
ReplyDeleteI have a problem where I have an hierarchical Models, in a form of a Tree, and while scrolling, the CPU goes high and it is not smooth.
If all the UI is loaded (no virtualization) then the scrolling is smooth and the CPU usage is low, but I don't want that.
I'll try to explain the models hierarchy:
I have a list of Regions, each region has a list of Rungs, and each rung contains a list of Elements.
The regions and the rungs are virtualized, but the elements are not (one a rung is loaded, I should see all elements).
A rung can even contain 40-80 elements, and the UI of the elements is complex...
Since while scrolling, rungs enter the viewport and therefor realized, then all the 40-80 usercontrols of the elements are also being created and then rendered, which causes the program to lag.
The ideal thing is to load/render the usercontrols in a different render thread (which seems to be impossible).
However, your video shows a smooth scrolling where UI loads async (with a nice animation where the opacity changes from 0 to 1).
Can you share the code?
Thanks
When will u be able to share it?
ReplyDeleteThanks
Any way to see the code for this? Please?
ReplyDeletecan u please share the code, and or can i buy a copy of it?
ReplyDeleteCan you share the code?
ReplyDeleteCan you share the code?
ReplyDeleteCan you share the code? Plz.
ReplyDelete