I can’t seem to find documentation about the performance of the GetChangeSet() function of LINQ-to-SQL’s DataContext class. I see a lot of code in our own organization and posted around the web making repeated calls to GetChangeSet() as if it had no performance impact (rather than caching the value from the first call). I know it can do a significant amount of work, but is that skipped on subsequent calls? How concerned should I be during code review if I see GetChangeSet().Inserts referred to in a loop, for example? How much effort should be put into caching the result of GetChangeSet in cases where caching is not a simple matter?
I can’t seem to find documentation about the performance of the GetChangeSet() function of
Share
I wouldn’t expect repeated calls to be performant at all.
According to the method’s documentation,
GetChangeSet()recalculates the list on every single call.