question

slipbits-2359 avatar image
0 Votes"
slipbits-2359 asked stevemrf-4055 commented

.Is there any way to stop .vs from growing

Visual Studio 16.9.4
Win6-64
My .vs folder has grown from 800MB to 1.2GB. Is there any way to stop this growth (and why is it happening)?

The total size of my C++ programs is 860KB. The .vs folder is about 1,395,348 times the total number of bytes in my entire source code. There are 50 files, header and source code, in my program. The .vs folder size seems excessive in comparison.

vs-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

karenpayneoregon avatar image
0 Votes"
karenpayneoregon answered

Try closing Visual Studio, delete the .vs folder will will clean up temporary caches and several other items. The thought is there is bloat in the caches. I'm working with 40+ projects in a solution with less than 300mb in the .vs folder.

If worried about removing the folder simply rename it, Visual Studio will recreate it the folder and contents fresh.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Viorel-1 avatar image
0 Votes"
Viorel-1 answered

It probably contains valuable data required for “precompiled headers” convenient feature. You can try disabling it — see Project Properties, C/C++, Precompiled Headers, Precompiled Header, and select “Not Using Precompiled Headers” (for all projects, configurations, platforms). However, the compilation time will probably degrade.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

slipbits-2359 avatar image
0 Votes"
slipbits-2359 answered

@FulvioCavarretta-7234 I don't use precompiled headers, and if I did it wouldn't explain the explosive size (1.2GB) or the growth (800Mb when I first looked, 1.2GGb a week or two later). It's hard to see that I have 1.2Gb of valuable data for a 800Kb project.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

slipbits-2359 avatar image
0 Votes"
slipbits-2359 answered stevemrf-4055 commented

@karenpayneoregon I will do what you suggest. I've looked a little closer at the nonsensical .vs, and found:

 .vs/HOAAnalysis/v16/ipch/AutoPCH/

Is where most (90%+) of the memory hides, and the the .ipch is sole repository of this baggage in a series of directories (with strange names), with each directory containing a single file named <filename>.ipch. The <filenames> seem to al be .cpp files of standalone *.h files in my project.

I did the following:

  1. Closed VS.

  2. Deleted all the <strange folder name>s

  3. Started VS

A single 52Mb <strange folder name>with a single 52Mb ipch file was created, named <my project name>.ipch.

This all means that VS is graciously creating 52Mb+ files to enhance my working experience. I can't tell you how grateful I am, and how soon I will be adding a single 4Tb HDD dedicated to a single 800Kb project. The consumer wold is so much better off with these 50Mb files that I just, absolutely just, don't know and to give them enough warm and cuddlies. Oh well.

Thanks karen.



· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Personally, I prefer better perfornance over saving a few gigs of incredibly cheap disk space but the link below might help you.

In general, if you have PCH set up for use with the build compiler, the intellisense compiler is able to pick up those PCH options and generate a PCH that can be used. Because the intellisense compiler uses a different PCH format from the build compiler, separate PCH files are created

ipch folder is massive



0 Votes 0 ·