Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VC file configuration property access 100x slower in VS2013 than in VS2010

$
0
0

Hi,

I have a VS addin that scans the solution on load and reads/writes various per-file VC configuration properties - for example, it toggles the ExcludedFromBuild flag for certain files based on user commands.

The problem I'm seeing, having just upgraded from VS2010 to VS2013, is that access to these per-file configuration properties is now (at least) 100x slower than it was in VS2013 - making the addin unusable. It used to take 0.07s to scan one of our projects on load (containing ~1500 source files), now it takes 8.5s! Loading the entire solution takes over 30s, so the addin cannot currently be used in VS2013.

I boiled the perf hotspot down to this repro code:

VCFile               vcFile        = projectItem.Object as VCFile; IVCCollection       vcFileConfigs = vcFile.FileConfigurations as IVCCollection; VCFileConfiguration vcFileConfig = vcFileConfigs.Item( "debug" ) as VCFileConfiguration;
IVCRulePropertyStorage vcToolRule = vcFileConfig.Tool as IVCRulePropertyStorage;
string pchVal = vcToolRule.GetEvaluatedPropertyValue( "PrecompiledHeader" );

This example shows access to a VCCLCompilerTool property, but reading'vcFileConfig.ExcludedFromBuild' is similarly slow. It does not seem to matter which property is being read or written, all such access is now very slow.

What changed between VS2010 and VS2013? Is there an alternative expression of this code that I can use which will run quickly enough to be usable?

Thanks!

iestyn



Viewing all articles
Browse latest Browse all 4410

Trending Articles