Clever little hacks from IncrediBuild team members and users. Use them to speed up your development right now

Disable On-Access Virus scanner

This may seem unrelated to Visual Studio build time, however the on-access scanner scans file during file operations. Thus, it’s a good idea to investigate the virus scanner and exclude development folders including.NET framework temporary files and folders.

Cutting Back on Debugging

Remove debug information for libraries who are rarely debugged (good gain).

Partial PDB

/debug:fastlink – Generate partial PDB

The linker spends a significant amount of time collecting and merging debug information into one PDB. With this switch, debug information is distributed across input object and library files. Link time for medium and large projects can speed up by as much as 2x. Following blog posts discuss this feature in detail

Incremental Link Boost

/incremental – Incremental link

The incremental link enables the linker to significantly speed up link times. With this feature turned on, linker can process just the differences between two links to generate the image and thus speed up link times by 4-10x in most cases after the first build. In VS2015 this feature was enhanced to handle additional common scenarios that were previously not supported.

Link Time Optimization

If you’re using the /GL flag to enable Whole Program Optimization (WPO) or the /LTCG flag to enable Link Time Code Generation, turning them off will improve link times significantly, at the expense of some optimizations

Visual Studio Acceleration

Change the environment variables path on the OS:

– On the Start menu, point to Settings, then click Control Panel.

– In the Control Panel, double-click System.

– In the System Properties dialog box, click the Environment tab, and change temp and tmp paths.

– Exit the development environment and restart it for the changed environment variable to take effect.

Understanding VS Errors

“When I am working with external resources (GLFW for example) and get errors that I don’t know what has caused them, I simple right click on the function, and then “peak definition” and “peak declaration”. Doing that might give you some answers.”

Debugging Hack

– While debugging, I can call any function in another DLL, while on a breakpoint, using the context operator ( ). This allows, for example, to detect memory corruption (using CRT calls) or to call our own library functions that save our objects on the spot for easier, offline debugging.”

Visual Studio Tab Transition

“Every now and then I go to sites like StackOverflow to learn new things, while coding. Since I don’t have a very big monitor, I have both windows maximized and layered on top of each other, and when I wanna transition between the windows, I press ALT and TAB.

Transitioning between tabs inside Visual Studio is possible too, all you’ve gotta do is press CTRL and TAB instead of ALT and TAB.

Cross Platform Hack

“I have been using Visual Studio for over 15 years but never knew there’s an alternative to adding the ubiquitous #include “stdafx.h” to each .cpp file to include the PCH file.

Instead you can use cl’s /FI (Name Forced Include File) compiler option to include “stdafx.h”.

This is very handy for cross-platform development where you need to support GCC or Clang.”

Via Scott Slack-Smith

Hack and Accelerate Your Continuous Integration Pipeline 30x Faster.

Download incredibulid for free