[Cmake] Autological Makefiles (+ VTK new build is *slow*)
Sebastien BARRE
sebastien at barre . nom . fr
Mon, 04 Jun 2001 22:27:58 +0200
At 04/06/2001 14:59, Brad King wrote:
Some news. And some surprise, explanation, and maybe a bad news. My
conclusion is : the dependencies are *never* cached !
First, be aware that I've just updated the CVS templates so that the
"Release" target is now the default (it was "MinSizeRel" before). It was
disturbing my timings :)
BTW Bill, I found how to specify that default. The top of the .dsp header
has entries like :
!MESSAGE "OUTPUT_LIBNAME - Win32 XXXXX"
=> the last one will be the default. So simple.
>Have you tried running the command line msdev when there are no .ncp or
>.opt files? Does it create them?
See my first email. It does not create them. No cache, nothing.
>That may help indicate whether it uses
>them at all.
Yes, that's why I suspect it does not use them : it does not create them,
and when there are present (created by the GUI), the compilation time does
not decrease.
>There is another possible explanation, though. How long does the GUI take
>to load when you run it for the first time and load the project files?
- It took around 15 seconds to load. Always. And I see in the
status line that all project files are read, and some dependencies updated.
- BUT (here is the scoop) the .ncb file is created *in the
background*, meaning that after 15 seconds I can work, but MSVC++ is still
dumping stuff to my hardisk. So I waited for my hard disk to calm
down... The .ncb files keep growing until 2.7 Mo, and it took him around :
- *120 seconds* to do that !
-At that moment, if everything is up to date, hitting "Build" will
take :
- around 50 s. the first time ! Total at this point is
TOT1 = 15 + 120 + 50 = 185 s.
- around 10 seconds the next time (of course nothing will
be build).
The .opt files was created when I left MSVC++. Let's forget about this one,
these are just options.
BUT the .ncb was also updated when I left, and grew from 2.7 to 5.2 Mo !
And this is done *in the background* too (but it's really quick, meaning
that it's a dump).
Then I launched the GUI again.
- It took around 15 seconds to load the project files, as usual.
- The .ncb file grew a bit to 5.4 Mo. Nothing to wait for.
- At that moment, if everything is up to date, hitting "Build"
will take :
- around 50 s. the first time (again) Total at this point
is TOT2 = 15 + 50 = 65 s.
- around 10 second the next time (of course nothing will
be build).
=> no change.
The .ncb was also updated when I left, and grew from 5.4 to 6.3 Mo.
Now here is something that will surprise you :
I erased all .ncb and .opt files, then launched the GUI *and* hit "Build"
immediately, then wait for the build to complete.
- A1 : It took around 15 seconds to load the project files, as usual.
- A3 : It took around 55 s. to complete the "up-to-date Build" (of
course nothing was built). Total at this point is TOT3 = 15 + 55 = 70 s,
approx. the same as TOT2.
- the .ncb file was *not* complete a this time and *kept growing*
in the background, although the build was finished ! (and this explain why
A3 was a bit longer this time (55 instead of 50), because something was
done in the background too).
So here are my conclusions :
>I
>would guess that most of the work done once when you first load the GUI is
>done each time the command line tool runs, and that the time difference
>has nothing to do with dependency building.
My guess is (on how to explain the T1 = 60 s. spent by msdev on the command
line) :
- A1 : it always takes 15 seconds to load the GUI and read the project
files. I think these are included in T1.
- A2 : it takes around 120 seconds to build a part of the .ncb. I think it
has *nothing to do* with dependencies ! The proof is that I was able to
launch and complete the build without a complete .ncb file (and it kept
growing in the background). My opinion (and I read something about that on
the web too) is that the .ncb file is a workspace file computed to provide
what the GUI need to enable smart browsing the source : ClassView and
IntelliSense
- A3 : then it *always* takes around 50 s. the *first time* "Build" is
called. I think the dependencies are computed *here*.
=> you notice that T1 = A1 + A3, so I guess this is it.
The bad news is : the dependencies are not cached ! I'm convinced they are
not. Whenever you launch the GUI, you will always experience that 50
seconds delay during the first build. I'm sure it is used to compute the
dependencies. And this is the very same delay for the command line version.
Furthermore, nothing is cached when msdev is called from the command line :
I'm sure that if they dependencies were cached using the GUI, they would be
too from the command line : thus the .ncb is definitely workspace/GUI related.
Thus, if you are using msdev from the command line (inside Emacs), you are
stuck ! you will always experience that delay, because it's used to compute
the dependencies (remember the /FD flag), and they are not cached.
*problematic* (at least for me).
What do you think ?