3

I am using the jcifs library to read the file data from a network system using smb. The code snippet is as below. I am observing a huge performance impact the read API. The read() takes a long time. After reading so many blogs i corrected the code, still no improvement. Can you please help on this.

SmbFile smbFileTest = new SmbFile(fileurl, authentication); //Takes 20sec
SmbFileInputStream input = new SmbFileInputStream(smbFileTest);
byte[] data = new byte[length];
int count = input.read(data); //takes nearly 15-20min to read a 135MB file. Also the length, i have provided is only to read 128KB. Still its taking huge time.

The below are my jcif config, i did after reading other post
System.setProperty("jcifs.resolveOrder", "DNS");
System.setProperty("jcifs.smb.client.dfs.disabled", "false"); //Changed true to false no improvement
System.setProperty("jcifs.smb.client.responseTimeout", "120000");
System.setProperty("jcifs.smb.client.disablePlainTextPasswords", "false");
System.setProperty("jcifs.util.loglevel", "3"); 

Thanks

Lokanath Nayak
  • 89
  • 2
  • 10

0 Answers0