[Top][All Lists]

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

Re: should GNU install call matchpathcon by default?

From: Jim Meyering
Subject: Re: should GNU install call matchpathcon by default?
Date: Wed, 07 Nov 2007 23:25:35 +0100

Jim Meyering <address@hidden> wrote:
> This morning I noticed a flagrant difference in the speed of
> "make install" for the just-released gettext-0.17.  It took 12(!)
> times longer on a rawhide system than on a usually-slower debian
> unstable system. (3min vs. 15s)


Dan Walsh suggested to use
matchpathcon_init_prefix (NULL, "/first_component_of_abs_dest/");
to limit the number of regular expressions matchpathcon will have to
compile.  That works very well, as long as you're not installing into
/usr, in which case it's still better than nothing.  When installing
into /tmp, the example above takes 21-22 seconds, rather than 180.
Much better.  However, installing into /usr/tmp still required about 70
seconds, so there's room for improvement.

I've implemented that, but haven't finished testing.

For reference, the gettext installation process invokes
  install -c -m ... src_file dst_file
1278 times.

Another suggestion:

  - avoid using matchpathcon altogether when there's an existing
      destination file: use its context, instead.

I'm not convinced that this is necessary.
Other opinions?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]