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

Delay when using EntityFrameworkDataSource

8 Answers 94 Views
EntityFrameworkDataSource
This is a migrated thread and some comments may be shown as answers.
Missing User
Missing User asked on 14 Jun 2012, 08:10 PM
Hello!

In our WPF project, we have a UserControl with a RadGridView to display persons. We decided to use the EntityFrameworkDataSource because it is easy to implement and offers a lot of advantages.

We implement the Entity Data Source and everything is working except one thing. When we click on the Menu to call the UserControl, a delay is occuring. the UserControl takes 5~10 seconds to appear, and when it appear the RadGridView is already loaded with the data.

If i remove the lines of the DataSource, the UserControl loads fast with 2 seconds. The Gridview only has 20 itens, i'm afraid that when the data begins to grow this delay became worse, it will impact a lot for the client.

Can you help me solving this? It is hard to explain with words, if you not understand the problem let me know and i try to make a video.

Thanks!

8 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 15 Jun 2012, 06:57 AM
Hi,

 I have tested how the GridView loads on our demo about EntityFrameworkDataSource. My observations are that the data was loaded quite fast on the demo.

May I ask you to make some additional tests in order to isolate the possible reasons for such a delay. What is the result if you set the ItemsSource without using the EntityFrameworkDataSource? Does it load faster? Any other relevant information would be helpful as well. 

Thank you for your cooperation.

Kind regards,
Didie
the Telerik team

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

0
Missing User
answered on 15 Jun 2012, 12:22 PM
Hi Didie,

I follow your instructions, I set the ItemSource without the EntityFrameworkDataSource. It notice that it load a little bit faster but still take a seconds to the UserControl appear.

I forget to say in the first post, We have a UserControl with RadTransitionControl that is the Container for all of the others UserControls, When a item on the menu is selected, we add the UserControl to the RadTransitionControl:
public void Navigate(int codigoModulo)
        {
            try {
                #region [ Pessoas ]
                if (codigoModulo == ModulosConstantes.PESSOAS_PESSOAS)
                {
                                                       //TrnConteudoSistema is the RadTransitionControl
                                                      //PessoasVisao is the UserControl that is taking long time to appear.
                    this.TrnConteudoSistema.Content = new ITS.Contatos.PessoasVisao();
                }
                     }
                 catch(exception){}
            }

The biggest problem is, We click on the menu, and the delay occurs even if I set the ItemsSource without the Entity DataSource. After 5 seconds the Animation occurs and the UserControls show with the data already loaded.

I was wondering if is there a way to only call the Load() when the animation already happened and the UserControl is loaded.
0
Dimitrina
Telerik team
answered on 20 Jun 2012, 07:00 AM
Hello,

 Thank you for that additional information.

 We have tested the loading time when using RadTransitionControl as well but we were not able to notice any delays.

Would it be possible for you to isolate the problem in a simlpe application so that we could further investigate it? You can follow the guidelines in this blog post how to isolate the problem in a sample project. 


Regards,
Didie
the Telerik team

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

0
Missing User
answered on 20 Jun 2012, 01:18 PM
Hi Didie,

Thanks for your help. I follow the blog post, and I manage to recreate the problem in a isolated sample project. I've created the sample project with the same "structure" of the original one, and I also recreate the database with the table that the EntityFrameWork uses.

I will attach a script to create the Database and the table/View and the WPF project.

Where do I attach the file? Here? Or should I open a support ticket?

Thanks!
0
Accepted
Dimitrina
Telerik team
answered on 20 Jun 2012, 03:06 PM
Hello,

It would be great if you send us the demo project in a support ticket. 

Regards,
Didie
the Telerik team

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

0
Missing User
answered on 21 Jun 2012, 12:04 PM
Hi Didie,

I send the sample project in the Support ticket.

Hope that helps.

Thanks!
0
Missing User
answered on 29 Jun 2012, 12:21 PM
Hi Didie,

Thank you for your support

I'd like to say that I set the GridView DataLoadMode to Asynchronous and now the UserControl loads a faster than before.

I just have one more question, the EntityFrameworkDataSource also have the IsBusy property like DataServiceDataSource?

IsBusy="{Binding IsBusy, ElementName=PessoasDataSource}"
0
Accepted
Dimitrina
Telerik team
answered on 02 Jul 2012, 10:47 AM
Hi,

 The load of the EntityFrameworkDataSource is synchronous and it does not have an IsBusy property. 

All the best,
Didie
the Telerik team

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

Tags
EntityFrameworkDataSource
Asked by
Missing User
Answers by
Dimitrina
Telerik team
Missing User
Share this question
or