Memory usage

Topics: User Forum
Jul 21, 2011 at 10:51 AM
Edited Jul 21, 2011 at 10:51 AM

Hello all!

Running SHFB on our full VS solution (100+ csproj) requires 6+ GB of memory. Quite huge. Is that normal? Should I try to split the job into several builds (but, if so, how to manage the links between all csproj?)

Any idea are welcome!

Jul 21, 2011 at 11:20 AM

Having more than 30 projects per solution is insane and not normal.

You should try break them up into 3 or 4 separate solutions! also I doubt that VS would use 6GB of memory as its limited to only 2GB per instance and I believe its only 3GB if 64bit and once that limit is reached you would get a memory error followed by a visual studio crash and reboot!

You must go insane waiting on a build to complete!

Jul 21, 2011 at 12:19 PM

How, the spider has bitten me (joke).

Actually, this big solution is our "referential" for the whole software suite we are building (we are working on a daily basis on smaller ones focusing some aspects of our software). And, no, to build the whole is not that heavy - we do it either from VS or from msbuild (ie cmd line).

Note that the 6Gb mentioned are for SHFB + the tools it used - BuildAssembler, etc. I notice SHFB may take 4Gb+ by itself (yes, I'm working on Win7 64bit). Here, SHFB was working 'standalone' (it's version 1.9.3.0, not the 1.9.3.1alpha).

Jul 21, 2011 at 12:48 PM

LOL least I do not have Tourette's

The answer your looking for "Is that normal?" YES YES YES it is.

To support this answer:

The following is a post quoted from Eric himself to save him some time as his answer will still be very similar. (posted http://shfb.codeplex.com/discussions/61703) Also note that this is in relation to an out of memory exception but still explains that yes evidently building the documentation is a very memory intensive process and can not really be avoided.


BuildAssembler can consume a vast amount of memory.  Unfortunately, there isn't anything I or SHFB can do to reduce BuildAssembler's memory usage.  Be sure that you haven't added unnecessary assemblies to the list to be documented.  If it's just a referenced assembly (one your project uses but that you don't want to document), be sure you add it to the project's References node rather than as a document source.  Another option is to perhaps use the API Filter to get rid of unnecessary items or, as a last resort, split the documented assemblies into separate projects to try and bring down the amount of information.

Eric