Re: Turn off dependency checking?



begin  Jeff Waugh  quotation:
> I'd like to work out what this is, as I've only had it reported on
> non-Linux systems. It's a matter of optimising the cookie-finding [
> I would prefer to actually fix this problem, not remove the symptoms
> :-) ].

	I'd love to work on optimizations for GAR cookie-finding.
Right now what a dependency build does in the latest GAR is this
(essentially):

dep-$(GARDIR)/%:
	$(MAKE) -C $(GARDIR)/$* install-p > || \
	$(MAKE) -C $(GARDIR)/$* install

Thus, we're forking a copy of make each time.  This is largely because
the LNX-BBC project has build deps, which are built only for the
purpose of building other stuff, and get thrown in a scratch dir that
will eventually be wiped (consider flex or bison as an example --
they're used to compile things, but we don't actually include them on
the bootable business card).

Thus we actually have to rely on the package's predicate calls to tell
us for real if something is installed or not.  

For a while I was doing it with a simple test line in the dep-foo
rules.  This was very fast as it had only to fork a copy of the shell,
not a new make instance that sourced in the new package makefile.  I
forget how old the GARNOME gar is, but if it uses anything like the
modern dep-checking, then it's probably forkings of make slowing you
down.  Just a guess, really.

> So, let's work out why it's slow...

The LNX-BBC tree has some hojillion dependencies and packages.  I'm
running these tests on an already-built tree, so the ONLY work it has
to do is dep-checking.  This is a Debian Testing system with a
skanky-ass old kernel and only one of its dual Pentium IIs being used:

----8<----
[gar(/usr/local/var/build-last/gar/meta/lnx-bbc)] time make showdeps | wc -l
    259

real    0m37.293s
user    0m12.130s
sys     0m25.140s
----8<----

	So some of those deps are repeated etc, but if GARNOME is
recent enough to have "showdeps" you should be able to compare for
number of dep-checking tests it'd have to do.  Note that the showdeps
itself took 37 seconds.  Long, but not half an hour.

----8<----
[gar(/usr/local/var/build-last/gar/meta/lnx-bbc)] time make install > /tmp/ttt

real    0m2.805s
user    0m0.520s
sys     0m2.150s
----8<----

This is largely because it doesn't do the deep dep checking like the
waaaay old GAR used to (because the super-old GAR used to do
deep-checking, while the code above only checks the dep one below
(unless I were to update install-p with deep checking, which I may
someday do!)).  

A make install in the singularity dir (which has 159 dependencies and
build deps) runs like this when all install deps are satisfied:

----8<----
[gar(~/bbc/gar/meta/singularity)] time make configure > /tmp/ttt

real    0m41.949s
user    0m10.450s
sys     0m31.560s
----8<----

So it looks like we're getting 3-4 deps checked per second.  Not the
best timing, but certainly not enough to make the thing take half an
hour!

Try doing a "time make configure" for a package that has all of its
deps satisfied.

-- 
Jack Valenti is to the American film viewer and the American public
as the Boston strangler is to the woman home alone. 
      -- http://cryptome.org/hrcw-hear.htm    (search for "Boston")



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]