This is a migrated thread and some comments may be shown as answers.

Asynchrounous loading of tile view- best practice suggestions please

3 Answers 135 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Subarna Bandyopadhya
Top achievements
Rank 1
Subarna Bandyopadhya asked on 06 May 2011, 10:55 AM
I am using the radTileview that has lots of child controls in each tileitem . The itemsource of the tileview can be potentially very large ( in millions).  If I try to load all the tiles, the ui hangs and it takes too long. So what I want to do is read the first 10 data items for the first 10 tileitems from my datasource and show it on the screen and then in the background keep populating the datasource model ( which is an observable collection ). As the datasource gets populated, the tileview should refresh and show the new items.
I tried the following
1. Creating the data source on a background thread, but this does not refresh the ui
2. Using the dispatcherTimer, but the behaviour is quite random. It refreshes the first lot of data and then the screen blanks out

I have set the following properties on the tileview

IsAutoScrollingEnabled

 

="True" IsVirtualizing="True"

 


Please can you suggest some best practises and I would be very obliged if you can send me some sample / example code. The tile view

Many thanks,
Subarna

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 11 May 2011, 08:38 AM
Hello Subarna Bandyopadhya,

 In order for the virtualization to work you'll have to set at least one of the RowHeight and ColumnWidth properties of the RadTileView to some static value (like 350px) so that not all items are visible at the same time. When you do that the Virtualization will automatically generate containers only for the visible items(those that are inside the viewable area) and you should not experience any ui hangs or other problems(note that depending on how "heavy" the content of the RadTileViewItems is you may experience some scrolling issues).
For further references could you please examine the attached project and if you have further questions feel free to ask.

Best wishes,
Zarko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
John
Top achievements
Rank 1
answered on 14 May 2012, 04:58 PM
Using a RadTileView with approximately 3500 tiles (one maximized) with content composed of a raddataform containing a radtabcontrol with 10 tabitems (average of 10 controls per tabitem), I have noticed scrolling is consistently slow and not smooth and animation is poor even with virtualization turned on.  Is there a recommendation to limits (number and type of controls) on radtileview content to avoid performance issues like these? 
0
Zarko
Telerik team
answered on 17 May 2012, 01:10 PM
Hello John,
The Virtualization in the RadTileView means that only the currently visible items will be generated, but when you start to scroll (especially in cases where you have so many items like you do) a lot of items become visible and this means that they have to be generated which takes time. Also the content of the RadTileViewItems has the biggest impact on the performance - if you have empty RadTileViewItems the scrolling will be smooth event with around 20 000 items but if you have GridViews in them event 100 items will decrease it dramatically.
Unfortunately the only partial workaround is to increase the MinimizedRowHeight so that less items are generated during scrolling (another workaround/approach is to use paging and have around 100-200 items on each page).
I've logged a new feature request in our PITS under the name "Add deferred scrolling support" and it'll be ready for tracking and voting tomorrow the lates.
If you have further questions feel free to ask.

Kind regards,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TileView
Asked by
Subarna Bandyopadhya
Top achievements
Rank 1
Answers by
Zarko
Telerik team
John
Top achievements
Rank 1
Share this question
or