Category Archives: Visual Studio

Self Inflicted Denial of Service in Visual Studio Search

After upgrading to Visual Studio 2013 I noticed that find-in-files had a problem when searching directories. The VS IDE would repeatedly hang, rendering it completely useless for the duration of the search. I filed a bug, complete with ETW traces … Continue reading

Posted in Investigative Reporting, Performance, Programming, Visual Studio, xperf | Tagged , | 11 Comments

You Got Your Web Browser in my Compiler!

I recently discovered that Microsoft’s VC++ compiler loads mshtml.dll – also known as Internet Explorer. The compiler does this whenever the /analyze option (requesting static code analysis) is used. I’m no compiler architecture expert, but a compiler that loads Internet … Continue reading

Posted in Code analysis, Investigative Reporting, Performance, Visual Studio, xperf | Tagged , , , | 77 Comments

Make VC++ Compiles Fast Through Parallel Compilation

The free lunch is over and our CPUs are not getting any faster so if you want faster builds then you have to do parallel builds. Visual Studio supports parallel compilation but it is poorly understood and often not even … Continue reading

Posted in Performance, Visual Studio, xperf | Tagged , , , , | 48 Comments

Making Compiles Slow Through Abuse of Templates

I’m planning a post on how to maximize build parallelism in VC++, but first I needed to create a simple project that was slow to compile. Creating such a program was an interesting exercise in its own right and I … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , , | 18 Comments

VC++ 2013 class Layout Change and Wasted Space

The VC++ compiler generally maintains a high degree of binary compatibility between compiler versions, allowing objects to be passed between DLLs made with different compiler versions. However VS 2013 made changes to the layouts of some classes in 64-bit builds. … Continue reading

Posted in Programming, Visual Studio | Tagged , , | 15 Comments

std::min Causing Three-Times Slowdown on VC++

Using macros to implement Min and Max has numerous well known pitfalls that can be avoided by using template functions. However the definitions of min and max that are mandated by the C++ standard cause VC++ to generate inefficient code. … Continue reading

Posted in Performance, Programming, Visual Studio | Tagged , | 47 Comments

How to Report a VC++ Code-Gen Bug

My coworkers recently found a bug in the x64 code generated by Visual C++. This bug exists in VC++ 2010 to VC++ 2013 RC. We put in a workaround (the traditional one of disabling optimizations for the afflicted function) and … Continue reading

Posted in Bugs, Investigative Reporting, Programming, Visual Studio | Tagged , , | 15 Comments