comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Findfile in large directories
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Findfile in large directories [message #50684 is a reply to message #50632] Fri, 13 October 2006 03:25 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
Wox wrote:
> In a widget application I'm making, I have "next file", "previous
> file" buttons which do the following:

[snip]

> The current loaded file is "list.path+list.file". SortListFiles sorts
> the files (in general not just string sort).
>
> However, in directories with up to 1000 or more files (usually also on
> an SMB mounted drive), this is rather slow (findfile takes most time).

Well, things will be slow on and SMB mounted drive, not much you can do
for that. How long does it take Windows Explorer to list all the files?
And does it get notified of changes quickly and reliably?

Using a cache to keep a list of the files is an option, but may be hard
if the directory contents change quickly. You may want to use
search_file with an approriate wildcard pattern to limit the list you
ask for to files that are likely to be next to the current file. This
pattern will depend on the file naming convention you have for this
directory (and please don't tell me that there is no convention for a
directory with 1000+ files).

Pre-structuring your data by educating your users to use subdirectories
and thereby limiting the number of files in a single directory might
also help.

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Findfile in large directories
Next Topic: Opening a .isv file

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 20:26:09 PDT 2025

Total time taken to generate the page: 0.47925 seconds