Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Sep 2015 02:20:04 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Martin Birgmeier <la5lbtyi@aon.at>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: file(1) command very slow
Message-ID:  <20150910192004.GA95721@rdtc.ru>
In-Reply-To: <55EAAD8D.9020902@aon.at>
References:  <55EAAD8D.9020902@aon.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Sep 05, 2015 at 10:53:33AM +0200, Martin Birgmeier wrote:

> Running the file(1) command on a 7 MB text file takes much longer in
> 10.2 than in 10.1.
> 
> Example:
> 
> # ll /tmp/x6
> -rw-r--r--  1 root  wheel  7384414 Sep  5 10:30 /tmp/x6
> # file /tmp/x6
> /tmp/x6: ASCII text
> file /tmp/x6  26.12s user 0.00s system 99% cpu 26.237 total
> #
> 
> I have this on all my machines since installing 10.2.
> 
> Any ideas on what is wrong?

I've found the change to libmagic that brought this.
Please try temporary workaround if you have sources installed:

cd /tmp
fetch http://www.grosbein.net/file/patch-softmagic.c
cd /usr/src/contrib/file
patch -R < /tmp/patch-softmagic.c
cd /usr/src/lib/libmagic
make obj clean depend && make all install


Eugene Grosbein



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150910192004.GA95721>