• Microsoft Reports Significant Performance Improvements in Entity Framework 5 (InfoQ)


    Microsoft has announced that the upcoming Entity Framework (EF) 5 could potentially improve performance up to 67 percent over EF 4.

    According to the ADO.NET team blog, the application performance improvements they've seen in this version of EF are partly due to auto-compilation of LINQ to Entities queries. The feature has always been a part of the framework, but developers had to call CompiledQuery.Compile to take advantage of it. This will now be handled automatically in EF 5: the first time a query is run, it's compiled and cached, so that successive requests can avoid the compilation step completely.

    EF 4 made use of a compiled query cache for ESQL queries, and EF 5 is extending this functionality to LINQ to Entity queries. Once the cache reaches 800 compiled queries an eviction algorithm kicks in that will clean the cache periodically, once every minute. Entries are removed from the cache on a LFRU (Least frequently – recently used) basis.

    Performance also improves using compiled LINQ to SQL queries. The ADO.NET team notes some changes to the way that query parameters are evaluated, which has resulted in up to 600 percent performance improvements in their internal testing.

    Despite efforts to deliver .NET Framework and EF releases independent of one another, the frameworks still share some core libraries: System.Data.Entity.dll, System.Data.Entity.Design.dll, and System.Web.Entity.dll. The upside to this fact is that developers using EF 4.0 should also experience performance improvements just by upgrading to .NET Framework 4.5.

    Because some of the new features in EF 5, such as Enum support and Spatial datatypes, are dependent on functionality in .NET Framework 4.5, it is not expected until after .NET 4.5 is released. Microsoft announced the availability of EF 4.3 earlier this month.

  • 相关阅读:
    Shodan在渗透测试及漏洞挖掘中的一些用法
    QUdpSocket 简单用法
    用QT操作数据库(本周学的)
    Qt使用UDp通信、套接字socket的成员函数bind()的作用
    ppm的含义
    数字的补数
    两数之和
    C++中的最大整数最小整数
    如何使用dockerfile将jar包生成镜像
    python3解决 json.dumps中文乱码
  • 原文地址:https://www.cnblogs.com/malaikuangren/p/2750658.html
Copyright © 2020-2023  润新知