开发者

Entity Framework 4: Drastic performance problems with global BaseClass

as a proof of concept I've changed my Model so that every entity derives from the abstract base class "TrackableEntity". Everything seemed to work fine in the beginning. While testing, I've encountered a severe performance problem when lazy-loading a simple navigation-property of an entity. The first time this association was called in the context it takes 10 seconds to load the related entity (from a table with only 5 entries!!). As it is a test system, there are only a t开发者_如何转开发otal of 100 entries in the whole database.

Any ideas?

Thanx.


You're running under a debugger, right? If so, just manually pause it and display the stack. You will catch it in the act, and the problem will be on the stack. You might want to repeat this a few times, just to make sure. Here's why it works.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜