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

Home » Public Forums » archive » Re: 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 #50631 is a reply to message #50624] Fri, 06 October 2006 07:22 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Wox writes:

> In a widget application I'm making, I have "next file", "previous
> file" buttons which do the following:
> ...
> path = findfile(list.path+'*'+list.Format)
> nfiles = n_elements(path)
> path = SortListFiles(path,list.sortmethod,list.sortseparator)
> ind = where(path eq list.path+list.file,count)
> ...
> <take next or previous file (if any) and read/display it>
> ...
>
> 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).
>
> Any ideas how to make this faster?

FINDFILE is obsolete. Have you tried FILE_SEARCH?
No idea if it would be faster or not. I'd have guessed
the sorting would be the bottleneck here.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: difference between icontour and contour?
Next Topic: Findfile in large directories

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

Current Time: Fri Oct 10 17:49:52 PDT 2025

Total time taken to generate the page: 0.32030 seconds