file(1) from base work very-very-very slow with some type of files (usually text files), from ports work fast
on big archives work well:
my computer and os:
Code:
[root@ns /var/soft/realtek/rtl_bsd_drv_v189]# ls -la if_re.c
-rw-rw-rw- 1 root wheel 1066579 Aug 24 10:55 if_re.c
[root@ns /var/soft/realtek/rtl_bsd_drv_v189]# time /usr/bin/file if_re.c
if_re.c: C source, ASCII text
real 0m18.582s
user 0m18.559s
sys 0m0.014s
[root@ns /var/soft/realtek/rtl_bsd_drv_v189]# time /usr/local/bin/file if_re.c
if_re.c: C source, ASCII text
real 0m0.189s
user 0m0.181s
sys 0m0.008s
on big archives work well:
Code:
[root@ns /usr/ports/distfiles/KDE/Qt/5.4.1]# ls -la qtbase-opensource-src-5.4.1.tar.xz
-rw-r--r-- 1 root wheel 46132220 Aug 9 18:23 qtbase-opensource-src-5.4.1.tar.xz
[root@ns /usr/ports/distfiles/KDE/Qt/5.4.1]# time /usr/bin/file qtbase-opensource-src-5.4.1.tar.xz
qtbase-opensource-src-5.4.1.tar.xz: XZ compressed data
real 0m0.005s
user 0m0.005s
sys 0m0.000s
[root@ns /usr/ports/distfiles/KDE/Qt/5.4.1]# time /usr/local/bin/file qtbase-opensource-src-5.4.1.tar.xz
qtbase-opensource-src-5.4.1.tar.xz: XZ compressed data
real 0m0.003s
user 0m0.000s
sys 0m0.008s
my computer and os:
Code:
FreeBSD 10.2-STABLE #0 r287023M: Sat Aug 22 22:31:32 IRKT 2015
root@ns.el.local:/usr/obj/usr/src/sys/el-new amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
CPU: Intel(R) Core(TM) i3-2105 CPU @ 3.10GHz (3093.04-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x206a7 Family=0x6 Model=0x2a Stepping=7
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE> Features2=0x1d9ae3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,POPCNT,TSCDLT,XSAVE,OSXSAVE,AVX>
AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
AMD Features2=0x1<LAHF>
XSAVE Features=0x1<XSAVEOPT>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
TSC: P-state invariant, performance statistics
real memory = 6442450944 (6144 MB)
avail memory = 6130532352 (5846 MB)