Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Jul 1999 17:29:55 -0600
From:      Wes Peters <wes@softweyr.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Leif Neland <leifn@neland.dk>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: speed of file(1)
Message-ID:  <3793B4F3.1E08C41D@softweyr.com>
References:  <199907192045.NAA99619@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> 
>     Check the size of the magic files on your FreeBSD and Linux boxen.
>     file was never really designed to be efficient.  FreeBSD's magic
>     file is /usr/share/misc/magic - around 164K.

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


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3793B4F3.1E08C41D>