Search conditions

Mar 22, 2008 at 1:29 PM
I've noticed that during a build there are two places where directories are searched for *.xml.

On my system at work it takes 15 minutes to get past each of these. At home, the entire build takes 5 minutes....

What directories are being searched? I'd like to make sure that they are organized properly and don't have extra stuff in them.

Since the source isn't available, I thought I'd try here.

Also... Would it be possible to record the name and location of the files, so they wouldn't need to be searched for again?

Mar 22, 2008 at 6:40 PM
Edited Mar 22, 2008 at 6:42 PM
Hi Brad,

The build output should tell you which directories are being searched. But I don't think the issue is finding the files, it's loading them into memory.

Does your home computer have less apps running simultaneously than your work computer when you build? Does it also have a faster processor and more memory, perhaps?

- Dave

EDIT: By build output I actually meant the stuff written to the console window during builds.
Mar 22, 2008 at 8:17 PM
I have MORE memory at work, a FASTER CPU and hard drive, and FEWER applications running.

Not yelling, just clarifying.

I was tweaking the caching options through SandCastle Help File Builder GUI and realized that the files in C:\Program Files\Sandcastle\Data\Reflection are actually being read into memory. (And we're not talking about a few small files <G>)

If the output would show that it was reading files instead of searching for them, that would be better. I may move some to a different directory in the future. It seems that if I select not to include referenced classes, they shouldn't be loaded.

Another thing I might try is disabling anti-virus. Macafee (at work) might be slowing things down more than Avast (at home)

Mar 22, 2008 at 9:40 PM
Hi Brad,

I guess a more accurate message would be better. It should add, "Loading reflection data..." after "Searching for...".

Internally, (although I don't know about SHFB's implementation if you're using the caching options), Directory.GetDirectories and Directory.GetFiles is used, so locating the XML files should be fast. If you move the files that you don't need for reference links out of the reflection directory then that may help performance.

I agree that the anti-virus software you're using may be worth looking into as well.

- Dave
Mar 23, 2008 at 1:18 AM
There are three points at which it loads data during the startup phase (load and index reflection data, load and index comments data, load and index reference link data). The first two usually don't take that long (10 seconds or so uncached). The third one (reference link data) is the slowest and due to the way it works, it always parses the files and isn't loaded from a cache. Only the MSDN URLs are cached and that only comes into play once it starts rendering topics. Indexing the reference data usually takes about 20-30 seconds tops on a fast machine with plenty of memory. 15 minutes is extreme so something else is having an effect.