From owner-freebsd-hackers Mon Jul 19 20:42:48 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id 063CC14E14 for ; Mon, 19 Jul 1999 20:42:46 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id UAA01242; Mon, 19 Jul 1999 20:42:42 -0700 (PDT) (envelope-from dillon) Date: Mon, 19 Jul 1999 20:42:42 -0700 (PDT) From: Matthew Dillon Message-Id: <199907200342.UAA01242@apollo.backplane.com> To: Wes Peters Cc: Leif Neland , freebsd-hackers@FreeBSD.ORG Subject: Re: speed of file(1) References: <199907192045.NAA99619@apollo.backplane.com> <3793B4F3.1E08C41D@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG : :The Linux one 169350 bytes, 4891 lines. The FreeBSD 3.1 magic file is :164223 bytes, 4802 lines. : :> Leif Neland asked: :> :> :While trying to port amavis, the virusscanner for mail, :> : http://aachalon.de/AMaViS/amavis-0.2.0-pre4.tar.gz ) I noticed it used the :> :file(1) several times for each file, and it took rather long time, causing : :This begs the question "Why?" Can't the program cache the results of file(1) :instead of calling it multiple times? : :Premature optimization is the root of all evil. : : :-- : "Where am I, and what am I doing in this handbasket?" : :Wes Peters Softweyr LLC :http://softweyr.com/ wes@softweyr.com Someone would have to compare file sources or profile it to figure out what is causing the slowness. -Matt Matthew Dillon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message