C# in Depth

Cover of C# in Depth
Order now (3rd edition)

Detecting performance problems

Chapter 10: Extension methods: 10.3.1

Created: 3/4/2008
Last updated: 3/4/2008

Deferred execution has a downside: if you write a query which will take a long time to execute, your profiler is unlikely to point you at the query creation point, which is where you're likely to be able to fix it. If you try to create queries close to the code which iterates over the results, you may find it easier to understand the performance characteristics.