Bug: Slow data load

3 posts, 0 answers
  1. Stuart
    Stuart avatar
    30 posts
    Member since:
    Jun 2010

    Posted 13 Jun 2011 Link to this post

    Hi

    I've just noticed that the RadTileView control is introducing an unacceptably long load time into my application. I have a page with two RadTileViewItems and both items contain ordinary toolkit datagrids that bind to data loaded via the page's ViewModel.The second of these datagrids, which contains about 3,000 records, can take anything between 10-20s to load, despite the data coming from a very fast procedure. In investigating I noticed that when I move the grid out of the RadTileView and just put in a new row alongside the RadTileView, the page loads almost instantaneously. What is the RadTileView doing in this case? Why is it slowing everything down?

    Thanks
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 15 Jun 2011 Link to this post

    Hello Stuart,
    Could you please give us some code snippets or a sample project because when I tried your scenario everything was working fine (I tried it with 9000 items and they loaded almost instantly)?
    Here is how I implemented it:
    MyItem.cs
    public class MyItem
    {
        private EntitySet brands;
      
        public string Header { get; set; }
        public EntitySet Brands
        {
            get
            {
                return brands;
            }
            set
            {
                brands = value;
            }
        }
    }
    MainViewModel.cs
    public class MainViewModel
    {
        private ObservableCollection<MyItem> items;
      
        public MainViewModel()
        {
            CarsDomainContext context = new CarsDomainContext();
            this.items = new ObservableCollection<MyItem>();
      
            MyItem first = new MyItem() { Header = "First" };
            MyItem second = new MyItem() { Header = "Second" };
      
            second.Brands = context.Brands;
            context.Load(context.GetBrandsQuery());
      
            this.items.Add(first);
            this.items.Add(second);
        }
      
        public ObservableCollection<MyItem> Items
        {
            get
            {
                return items;
            }
        }
    }
    And the XAML is:
    <telerik:RadTileView ItemsSource="{Binding Items}" MinimizedColumnWidth="250">
        <telerik:RadTileView.ItemTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding Header}" />
            </DataTemplate>
        </telerik:RadTileView.ItemTemplate>
        <telerik:RadTileView.ContentTemplate>
            <DataTemplate>
                <sdk:DataGrid ItemsSource="{Binding Brands}" />
            </DataTemplate>
        </telerik:RadTileView.ContentTemplate>
    </telerik:RadTileView>


    Kind regards,
    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
  3. DevCraft banner
  4. Stuart
    Stuart avatar
    30 posts
    Member since:
    Jun 2010

    Posted 15 Jun 2011 Link to this post

    Thanks Zarko. I've just created a test project with my stripped out code - minus the converters etc - and it appears to be loading fine! I'm not sure what was causing the delay in the original project - probably bad coding in the converters on my part? - but it certainly doesn't appear to be the TileViewItem. Feel free to delete this thread as necessary and thanks for your time.
Back to Top