Skip to content

No mention of AsNoTrackingWithIdentityResolution() #4441

Open
@mqudsi

Description

@mqudsi

I came across this page looking for already-compiled benchmark/performance info on the difference between AsNoTracking() and AsNoTrackingWithIdentityResolution() for cases where the resulting graph contains multiple references to the same document. I expected (especially given that the document has ben recently updated) that, in addition to the comparisons between AsNoTracking() and AsTracking(), I would find a comparison with AsNoTrackingWithIdentityResolution().

The goal is to understand the performance impact (cpu and primarily gc pressure) of relying on AsNoTrackingWithIdentityResolution() vs manually deduplicating the object graph by only selecting the id and then using a separate pass to assign the referenced value by querying against the previous results of a separate AsNoTracking() db query for the values for a case where the bulk of the objects in the resulting object graph (of thousands of records) are unique (i.e. would not benefit from identity resolution) but have a single navigation property pointing to one of a dozen or so discrete objects which I would want deduplicated to avoid the memory pressure if I were to Include() that navigation property with AsNoTracking().


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions