grahamboree, I just replaced nine Linq function calls with equivalent simple loops and cut the runtime of an asset processing tool from 2m40s to 1m5s.
That's 95 seconds of nothing but Linq overhead.
The code does the exact same work in the exact same way, the only difference is whether it uses Linq or not.
The most expensive call by far was "ToArray()", taking nearly 75% of the profile time.
That's beyond insane. If this doesn't make you scared of Linq, I don't know what will.
Add comment