IdentityServer3.EntityFramework icon indicating copy to clipboard operation
IdentityServer3.EntityFramework copied to clipboard

EF Performance - As No Tracking

Open wjonesy opened this issue 8 years ago • 2 comments

Hello,

I have had a look through the code base and I have found that when we read data from the database, there is no need for EF's change tracking, as no manipulation is done to the data being read. I.E. SaveChanges() is not being called after a read.

To improve performance, each query could be decorated with .AsNoTracking(), turning off EF's ability to track changes in the context.

If this is deemed to be a useful change I am happy to give a pull request a go.

Thanks

wjonesy avatar Feb 20 '17 09:02 wjonesy

Would it introduce any breaking or behavior changes that would be deemed breaking?

brockallen avatar Feb 20 '17 13:02 brockallen

Not that I can see so far.

wjonesy avatar Feb 20 '17 13:02 wjonesy