Slow VC++ builds from Linux fileserver

Richard Lam richardl at research.canon.com.au
Sat Sep 12 02:52:17 GMT 1998


David Collier-Brown wrote:

> Jim Hague wrote:
> >
> > >As a table:
> > >       Server          Client          Time
> > >       ------          ------          ----
> > >       UltraSparc      NT4             33
> > >       Linux           NT4             165
> > >       NT4             NT4             -
> > >       UltraSparc      win95           54
> > >       Linux           win95           54
> > >       NT4             win95           64
> >
> > Thanks for the suggestions. Unfortunately I haven't managed to make any
> > progress, and won't be able to now - I'm leaving this job today.
> >
> > As suggested, I've tried switching oplocks/share/locking/etc on and off,
> > with no major differences. I have discovered that it's related to the
> > precompiled header handling. Without precompiled headers, W95 and NT4
> > clients proceed at the same speed.
> >
> > Looking at a log dump, it would appear what is going on is that NT4 is
> > getting some sort of status information that convinces it that the
> > precompiled header file is invalid; it reads it happily, then suddenly
> > truncates it and rebuilds it.  This would appear to be the cause of the
> > slow performance rather than a particularly slow transaction. If I had the
> > time and resources, the next thing I'd do is to take a packet log and
> > compare the built from Samba and a NT4 server and see if I could spot a
> > point at which the transactions diverge.
>
>         Aha!
>         Although I can't speak to the immediate problem,
>         I can suggest an underlying strategy: look and
>         see if the headers include each other in large
>         and foolish fashion.
>
>         A colleague just reduced an 8-hour build to a 2-hour build
>         by discovering a deep tree of header-includes-header
>         that the end developers didn't realize they were using.
>         Probably fixed some ``redefined'' bugs too (:-))

Thanks for the suggestion. We do guard against recursive includes by wrapping
our headers files with

#ifndef XXX_H
#define XXX_H

...

#endif

Although this doesn't guard against the compiler opening the header files
unnecessarily, it does prevent redefined warning. I don't know the consequences
of this on the behaviour of the compiler in terms of reading the precompiled
header file though. But I don't think this is the cause of the problem as we've
compared the compilation of identical projects on WIN95 and the performance is
acceptable.

Further suggestions are welcome.:-)

Cheers
Richard



More information about the samba mailing list