Jim Meyering <jim@xxxxxxxxxxxx> 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) FYI, 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? -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with the words "unsubscribe selinux" without quotes as the message.