From owner-freebsd-stable@freebsd.org Sat Sep 12 19:06:07 2015 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 509D0A037F8 for ; Sat, 12 Sep 2015 19:06:07 +0000 (UTC) (envelope-from la5lbtyi@aon.at) Received: from smtpout-fallback.aon.at (smtpout-fallback.aon.at [195.3.96.119]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A17961C26 for ; Sat, 12 Sep 2015 19:06:05 +0000 (UTC) (envelope-from la5lbtyi@aon.at) Received: (qmail 4979 invoked from network); 12 Sep 2015 18:59:21 -0000 Received: from unknown (HELO smtpout.aon.at) ([172.18.1.205]) (envelope-sender ) by fallback43.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 12 Sep 2015 18:59:21 -0000 Received: (qmail 3028 invoked from network); 12 Sep 2015 18:59:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on WARSBL604.highway.telekom.at X-Spam-Level: Received: from 88-117-64-47.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([88.117.64.47]) (envelope-sender ) by smarthub77.res.a1.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP; 12 Sep 2015 18:59:12 -0000 X-A1Mail-Track-Id: 1442084351:3022:smarthub77:88.117.64.47:1 Received: from mizar.xyzzy (mizar.xyzzy [192.168.1.19]) by gandalf.xyzzy (8.15.2/8.15.2) with ESMTP id t8CIxB3d019102; Sat, 12 Sep 2015 20:59:11 +0200 (CEST) (envelope-from la5lbtyi@aon.at) Subject: Re: file(1) command very slow To: Eugene Grosbein , freebsd-stable@freebsd.org References: <55EAAD8D.9020902@aon.at> <55F3C3B9.3020103@grosbein.net> From: Martin Birgmeier Organization: MBi at home Message-ID: <55F475FF.8010007@aon.at> Date: Sat, 12 Sep 2015 20:59:11 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <55F3C3B9.3020103@grosbein.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Sep 2015 19:06:07 -0000 Dear Eugene, Thank you for your efforts, I have been following them in the upstream PR you filed. Regards, Martin On 09/12/15 08:18, Eugene Grosbein wrote: > 05.09.2015 15:53, Martin Birgmeier пишет: >> 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. > > The problem is now fixed upstream libmagic code repository > but we'll have to wait for file-5.25 release. > > I've extracted official code fix from its repository, apply as following: > > fetch http://www.grosbein.net/file/patch-regexmax.diff > cd /usr/src > patch < /path/to/patch-regexmax.diff > cd lib/libmagic > make obj depend && make all install > > > > > >