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
pgpkae67IVhm4.pgp
Description: PGP signature