[jcifs] search files by jcifs

andrea.lanza at frameweb.it andrea.lanza at frameweb.it
Tue Mar 4 20:56:09 EST 2003


I searched all the examples files (.java source) I downloaded boundled to
the jcifs classes.
I did't find any "Crawler.java" or "search.java" or "find.java" and so on,
so I thougth that they had to be elsewhere..
After yourr answer I checked better and I found a "SmbCrawler.java. " and
other Crawler...

Anyway I discovered that the algortihm I am using is not so bad, but thanks
to you now is REALLY better.

I used a function searchFiles(java.lang.String value)

In this function I built a SmbFile and then recursively I called the same
function.

Now I changed the argoument to be an SmbFile itself, (before I used a
string, built the SmbFile, then in the next Smbfiles obtained from the
listFiles() method  I took the string name with the getCanonicalPath() and
call again the function: I know it was very stupid...)

Anyway here are the results searching the word "txt" in a network drive
recursively

BEFORE
16184 files/dir examined            151 files matchin criteria found    2
minutes 07 seconds elapsed

NOW
16184 files/dir examined            151 files matchin criteria found    14
seconds elapsed

USING THE SEARCH BUILT-IN in the  Windows 2000 Operating System
                        151 files found               38 seconds elapsed

It's very exiting , now it quite 3 times faster than trhe search built in
!!!!

Thank you, and thanks to anybody who moved my attention to the performance
perspective of searching files


Andrea





|---------+------------------------------------------------------>
|         |           "Christopher R. Hertel" <crh at ubiqx.mn.org> |
|         |           Sent by:                                   |
|         |           jcifs-bounces+andrea.lanza=frameweb.it at list|
|         |           s.samba.org                                |
|         |                                                      |
|         |                                                      |
|         |           03/03/2003 19.53                           |
|         |                                                      |
|---------+------------------------------------------------------>
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       andrea.lanza at frameweb.it                                                     |
  |       cc:       jcifs at lists.samba.org                                                        |
  |       Subject:  Re: [jcifs] search files by jcifs                                            |
  >----------------------------------------------------------------------------------------------|




When you download the complete jCIFS tarball (or zip or whatever) it
includes the jCIFS source and a directory full of example software.

On Mon, Mar 03, 2003 at 05:33:54PM +0100, andrea.lanza at frameweb.it wrote:
>
>  > .......Look at the crawler examples for ways to speed up the algorithm
>
> Where can I find these examples ?
>
>
> Andrea
>
>
>

--
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org






More information about the jcifs mailing list