Re: Suggestion for file type detection approach
- From: Arvind Narayanan <arvindn meenakshi cs iitm ernet in>
- To: gnome-devel-list gnome org
- Subject: Re: Suggestion for file type detection approach
- Date: Sun, 4 Jan 2004 20:58:03 +0530
On Sun, Jan 04, 2004 at 10:30:47AM -0500, Jeffrey Stedfast wrote:
>
> just because the bulk of the time spent will be in i/o, does not mean
> that profiling will be useless.
>
> anyways, just out of curiosity, I timed 'ls -l' and 'file' in /usr/bin
> and here are the results I get:
I tried this too. You're getting such quick times because the disk
blocks are cached already. It would have been very slow the first time
you tried it. Reboot and try file again if you like.
This is what I get:
$ time file /usr/bin/* > /dev/null # first time
real 0m16.017s
user 0m0.310s
sys 0m0.480s
$ time file /usr/bin/* > /dev/null
real 0m0.455s
user 0m0.290s
sys 0m0.160s
$ time file /usr/bin/* > /dev/null
real 0m0.450s
user 0m0.300s
sys 0m0.150s
>
> `time /bin/ls -l /usr/bin`
> real 0m2.783s
> user 0m0.060s
> sys 0m0.010s
>
> `time file /usr/bin/*`
> real 0m2.788s
> user 0m0.060s
> sys 0m0.120s
>
> looks to me like "sniffing will suck performance-wise" is a hunk of
> crap, at least assuming file-type sniffing is done efficiently.
But you can't do it efficiently unless you can magically predict
which directory the user is going to click on next. And you can't
pre-cache the entire disk, can you?
Arvind
--
Its all GNU to me
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]