fam
[Top] [All Lists]

Re: [fam] Re: fam

To: rusty@xxxxxxx
Subject: Re: [fam] Re: fam
From: raster@xxxxxxxxxxxxx
Date: Wed, 23 Aug 2000 00:34:01 -0700 (PDT)
Cc: rusty@xxxxxxxxxxxxxxxxxx, kempler@xxxxxxxxxxxx, fam@xxxxxxxxxxx
In-reply-to: <10008230010.ZM12865@xxxxxxxxxxxxxxxxxx>
Reply-to: raster@xxxxxxxxxxxxx
Sender: owner-fam@xxxxxxxxxxx
On 23 Aug, Rusty Ballinger scribbled:
->  
->  > His main reason against fam sorting the directory is that it couldn't
->  > respond to the process until it read the whole directory. That's 
legitimate
->  > IMHO, but I still want to find a way to do it so fam can return just the
->  > first 15 files. Know of a way to get the fs to return it sorted, without
->  > requiring imon? Raster suggested that you query fam at run-time for extra
->  > features only provided by imon, i.e., the ability to get the first 15 
files
->  > alphabetically-sorted.
->  
->  No... & I think most (all?) fs's don't even store them sorted in an order
->  which is useful to people; ls -1f on both xfs & ext2 gives you the files in
->  whatever order the filesystem found most useful to store them in.  I think
->  this means that *any* process (even in kernel space) has to traverse the
->  entire directory before giving you any portion of a sorted list.  (And I
->  believe imon doesn't do this, in case you're saying it already does!)
->  
->  Also, it seems like when you ask for "the first 15 files", keep in mind the
->  kinds of filters & ordering a decent file manager will give you: sort by
->  size, by type first & name second, by modification date, reverse, only show
->  me *.txt, include hidden files, etc.  Anything which is going to give you
->  "the first 15 files" ought to be flexible enough to let you specify the sort
->  criteria, file globs for filtering, and the locale.  (Is there some existing
->  library which does this?  Seems like a generally useful facility.)
->  
->  Now, in the case where fam is looking at a 1000-file directory, a lot of
->  traffic can be saved if it can pass back only the "first" 15 files... so
->  this flexibility, although hard to do, might be worth the effort.  (On the
->  other hand, what's a client application going to do once it's got the first
->  15 files?  Ask for the remaining 985, I think...  But still, if the
->  application can remain responsive while this is happening, and without
->  simply processing n events per visit from the main select() loop, that's an
->  improvement.)

actually i see zero use for pre-sorted files - it just puts complexity
in fam that wont cover all cases - then fam has to also sit and wait
till it's read all 1000 or whaetvere file sfirst then sort THEN dump to
the app - no - i think it's bad. it shoudl be up to the client to
figure what it wants to do with the files it gets. it can so anything
it wants then and save pre-processing the list which won't save
processing - it just shifts it to fam and then limits it to what fam
can do. :)

-- 
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
The Rasterman (Carsten Haitzler)    raster@xxxxxxxxxxxxx     raster@xxxxxxxxxxx
                                    raster@xxxxxxxxxxxxxxxxx raster@xxxxxxxxx
                                    raster@xxxxxxxxxx


--
Source code, list archive, and docs: http://oss.sgi.com/projects/fam/
To unsubscribe: echo unsubscribe fam | mail majordomo@xxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>