Package: file
Version: 4.26-1
Severity: important
Analyzing a file with lots of end of lines (0x0A) lets file consume minutes of
CPU time.
Time consumption depends on CPU.
Debian 4.0 with file version file-4.17 is not affected.
example data for Intel Q6600 @2.4GHz:
round:end of lines:time in seconds
1:1:0.00
2:2:0.00
3:4:0.00
4:8:0.00
5:16:0.00
6:32:0.00
7:64:0.00
8:128:0.00
9:256:0.00
10:512:0.01
11:1024:0.04
12:2048:0.15
13:4096:0.46
14:8192:2.66
15:16384:7.52
16:32768:32.25
17:65536:119.45
18:131072:283.54
19:262144:288.40
20:524288:306.23
21:1048576:269.62
22:2097152:283.24
23:4194304:275.79
24:8388608:305.63
25:16777216:268.72
26:33554432:272.70
27:67108864:273.82
28:134217728:284.44
29:268435456:307.46
30:536870912:280.62
test script needs up to 512MB free space in /tmp!
#!/bin/sh
echo "">/tmp/file.test;
for j in `seq 1 30`; do
COUNT=`wc -l < /tmp/file.test`
echo -n "$j:$COUNT:"
RUNTIME="$(/usr/bin/time -f '%U' file /tmp/file.test| sed -e '/.*/d' 2>&1)"
echo -n $RUNTIME
cat /tmp/file.test /tmp/file.test >> /tmp/file.test.1;
mv /tmp/file.test.1 /tmp/file.test
done
-- System Information:
Debian Release: 5.0.4
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-bpo.2-686 (SMP w/4 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages file depends on:
ii libc6 2.7-18lenny2 GNU C Library: Shared libraries
ii libmagic1 4.26-1 File type determination library us
ii zlib1g 1:1.2.3.3.dfsg-12 compression library - runtime
file recommends no packages.
file suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]