none
EF5 : Performance Issues RRS feed

  • Discussion générale

  • Hi,

    I'm managing to migrate our application from EF4 to EF5 and I'm really sad to see that performances are really ugly compared to what we had with EF4. Let me explain :

    Our application has a little framework that maps Entities to DTO. To avoid lazy loading but to keep in mind that a null property that is not loaded is not null, I do some tests before mapping my entity into my DTO.

    So, to do that, I test if my property IsLoaded and if not, I throw an exception.

    With EF4, it was really simple and performances are great.

    Using EF5 and Reference.IsLoaded, performances have felt to something really slow.

    I've tried to make my own condition to see if an entity is loaded or not using Context.ENTITY.Local with a where condition on it to find the local entity by its Id. => same thing, really slow.

    So I wanted to know if there were some problems on the EF5 cache or something like that ?

    • Type modifié Aurel Bera mardi 18 juin 2013 13:07 Discussion
    vendredi 14 juin 2013 09:02

Toutes les réponses