Skip to content

Massive performance hit when upgrading from 1.0.8.18 to 1.0.9 #236

@ascott18

Description

@ascott18

We have a bit of code that, in this example, ends up calling .OrderBy("SomeProperty ASC, SomeOtherProp DESC") a total of 262 times, each time on an EnumerableQuery<T> (that is, LINQ to objects rather than LINQ to sql).

With 1.0.8.18, the total CPU time spent in System.Linq.Dynamic.Core.DynamicQueryableExtensions::OrderBy was ~58ms. In 1.0.9, the total CPU time for the same code against the same data is ~17691ms:

image

It appears that System.Linq.Dynamic.Core is iterating over every single type currently loaded into the app domain, and pulling the custom attributes from every one of those types? Why is it doing this? Why does it do this on every single call to OrderBy()?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions