/usr/bin/file from base very slow processes large text files (for example in Midnight Commander). After removed /usr/bin/file and create link to /usr/local/bin/file (install from ports sysutils/file), MC again quickly open large files. Timing for /usr/bin/file: # time file /usr/ports/UPDATING /usr/ports/UPDATING: ASCII text 13.811u 0.007s 0:13.84 99.7% 20+173k 0+0io 0pf+0w Timing for /usr/local/bin/file: # time file /usr/ports/UPDATING /usr/ports/UPDATING: ASCII text 0.247u 0.000s 0:00.24 100.0% 20+175k 0+0io 0pf+0w # uname -srm FreeBSD 10.2-RELEASE-p2 amd64 # less make.conf #BATCH=YES #FORCE_PKG_REGISTER=YES CPUTYPE?=core2 OPTIONS_SET=CUPS WITHOUT_LPR=YES DEFAULT_VERSIONS+=apache=2.2 QT4_OPTIONS=CUPS NAS QGTKSTYLE LOCALIZED_LANG=ru DEFAULT_VERSIONS+=perl5=5.18 Detail: https://forums.freebsd.org/threads/usr-bin-file-works-very-slow.52958/
The problem is in /usr/share/misc/magic. I replaced /usr/share/misc/magic* from older release and now it works fast.
What version FreeBSD you are used for replaced /usr/share/misc/magic*?
Even, if replaced files in /usr/share/misc/magic*, this problem in the base system and it is not solved.
+re@ and secteam@ I think this is http://bugs.gw.com/view.php?id=474 and was fixed in later file imports (thus 10.3-RELEASE which is shipped with file 5.25). It's not yet clear to me if this warrants an EN (as it's only complained by very few people), though, but that's an option.
Waiting fix in the 10.3-RELEASE ...
<uname> FreeBSD 10.3-RC1 amd64 Timing for /usr/bin/file: # time file /usr/ports/UPDATING /usr/ports/UPDATING: ASCII text 0.214u 0.000s 0:00.21 100.0% 21+181k 2+0io 0pf+0w /usr/bin/file working is fine! Thanks!
<uname> FreeBSD 10.3-RELEASE amd64 Problem solved. PR can be closed.
Confirmed fixed by the submitter