[jcifs] Delay in listing network hosts

Michael B.Allen mballen at erols.com
Fri Nov 16 07:26:39 EST 2001


On Thu, 15 Nov 2001 10:14:44 -0800
"Kurien Mathew" <kurien at envivio.com> wrote:

> I am using jcifs to list the hosts on the network and find that it takes
> 3-12 seconds to find each host.
> 
> I tried this on a couple of networks and there is always the delay.
> 
> Is there some way to speed this up?

Are you crawling? Or are you just listing hosts? If you are using the
ThreadedSmbCrawler this is normal. If you were to do a packet capture
with Ethereal or Netmon you would see there are several hundred packets
per second being transmitted and received every second. This is actually
still quite slow but jCIFS is not designed for crawling (just a stupid
net trick :~). A change in the interface ~0.7 will improve this vastly.

If you are not crawling but rather just enumerating each host use the
SmbFile.list() method with an SMB URL of smb://workgroup. That operation
takes only a few moments to list all hosts in the workrgoup.

If your not doing either we need more information:

1) What _exactly_ are you doing?
2) What type of name service are you using (WINS, DNS, ...)?
3) Provide a trace from adding java parameter -Dlog=ALL
4) Provide PropertiesTree file (minus password)

Mike




More information about the jcifs mailing list