Date: Sat, 19 Jun 2010 13:54:57 +1000 From: Peter Jeremy <peterjeremy@acm.org> To: freebsd-hackers@freebsd.org, file@mx.gw.com Subject: Poor file(1) performance Message-ID: <20100619035457.GA63510@server.vk2pj.dyndns.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
I recently had reason to run file(1) (file-5.03 on FreeBSD 8-stable)
on a large number of files and felt the performance wasn't up to par.
When I investigated further, I found that about 95% of the runtime
related to the two regex's to recognize REXX files:
# OS/2 batch files are REXX. the second regex is a bit generic, oh well
# the matched commands seem to be common in REXX and uncommon elsewhere
100 regex/c =^[\ \t]{0,10}call[\ \t]{1,10}rxfunc OS/2 REXX batch file text
100 regex/c =^[\ \t]{0,10}say\ ['"] OS/2 REXX batch file text
Since REXX files are not present in my environment, I can avoid the
issue by just commenting out the offending lines. Someone with more
expertise in magic(5) might be able to suggest a better fix.
--
Peter Jeremy
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
iEYEARECAAYFAkwcP5EACgkQ/opHv/APuIewSgCcDVrNVUEwmNakzKpRvMEFlWkh
QgsAnjpvKCYtn1nYbzXdiFfU+rEQzFTY
=BXDH
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100619035457.GA63510>
