Search for existing suggestions

Speed up view generation process

View generation process is too slow. I tested it with 400 entities and it takes about 15 seconds regardless of using a DB First or Code First approach. I know views can be pre-generated in DB First scenario (although I don't think that a first class product should rely on such workarounds), but that can't be done with Code First.

18 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Anil Mujagic shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    EF6.1 contains additional tweaks to the substantial improvements made in EF6 that improve the performance in certain scenarios deep and complex inheritance with associations in subtypes. For all the models we have tested recently, even for those with thousands of entities and associations and great complexity, view generation is completed within a few seconds.

    If there are models out there for which even EF 6.1 cannot generate views quickly, we would like to hear from them. Please file a bug at http://entityframework.codeplex.com/WorkItem/Create and attach the model.


    EF 6 alpha 2 includes improvements in view generation performance for large models contributed by a member of the EF’s open source community. We are working on further improvements for complex models. See the alpha 2 announcement here: http://blogs.msdn.com/b/adonet/archive/2012/12/10/ef6-alpha-2-available-on-nuget.aspx.

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • dave commented  ·   ·  Flag as inappropriate

        Hi Diego,

        I will try to extract some entities (and clone them) so that i can provide you a model. Once i have it, where should i provide the files?

      • AdminDiego Vega (Program Manager, Microsoft Entity Framework) commented  ·   ·  Flag as inappropriate

        Hello Dave,

        We are definitively interested in improving the performance for any EF models that still lead to slow view generation after the changes we made in EF6, but we need models that we can use to reproduce the behavior. Any chances you could provide yours? An obfuscated version of the model would work.

      • dave commented  ·   ·  Flag as inappropriate

        Please improve this!

        I am working with EF 6 Alpha 3 and View generation is still extremely slow!
        I have 300 real-world entities (5 - 15 properties, 5-10 associations) and view generation takes up to 2 minutes!

        Pre-Compiling views is cumbersome as there is no api where i can plug in the pregeneration into the application code so that the developer does not have to trigger it manually. Also waiting 2 minutes for pre-compiling views is way too much!

        I have tested the same entity-set with nhibernate were the same process takes just about 12 seconds.

      Feedback and Knowledge Base