The guys on the VS team looked at this for me and found a problem with intellisense. Here's their description:
"It looks like both of the files you gave me contain a part of static partial class EntityPropertyDescriptors, and I would guess that all the rest of the 500 files do too. What’s happening is that as we build up our IntelliSense cache, each time we parse one of these files, we see that it has a static class in it, and we decide to see if that static class has any extension methods. In order to look for the extension methods, we look through each method in each part to see if it’s an extension method. This causes us to reparse every file in order to see if the type has any extension methods."
They found a similar problem with VS2010 but are fixing it now. Unfortunately, they are not going to fix it in VS2008, so we are left with the workaround of putting all the partial classes into a single file. They can still be partials, but they must be in the same physical file to get around the problem.
After combining all partial classes into a single file, load time for this problem project when from 30 minutes to about 10 seconds.
Big thanks to Eric Lippert and Kevin Pilch-Bisson for helping me with this.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…