Menu

Fixing slow performance when index is on network drive

2014-11-02
2014-11-02
  • Mateusz Knapik

    Mateusz Knapik - 2014-11-02

    First of all, thanks for such great software!

    I've encountered slow performance when index files are placed on network drive.

    This is because index files are being read using ObjectInputStream class, which is not buffered. This causes dramatic overhead.
    Wrapping FileInputStream with BufferedInputStream class seems to solve this problem :)
    i.e.
    before:
    in = new ObjectInputStream(fin);
    after:
    in = new ObjectInputStream(new BufferedInputStream(fin));

    I'm not java programmer by any means, so I don't know what other problems this can trigger!
    But it works for me :)

    BR
    Mateusz

     
  • Nam-Quang Tran

    Nam-Quang Tran - 2014-11-02

    Hi,

    Thanks for pointing this out. I think wrapping the FileInputStream into a BufferedInputStream shouldn't cause any problems. I will add this in one of the next releases.

    Best regards
    q:-) <= Quang

     
  • Nam-Quang Tran

    Nam-Quang Tran - 2014-11-02

    Btw, I also wrapped the FileOutputStream read by ObjectOutputStream in a BufferedOutputStream.

     

Log in to post a comment.