Menu

Model file compression and general efficiency

Help
2010-03-26
2013-04-16
  • Takeshi Kovacs

    Takeshi Kovacs - 2010-03-26

    Hi, I am new to OpenNLP and find it to be great so far. However, I'm trying to optimize the deployment a bit. Does anyone have any insights as to how the compression of model files affect performance? Would there be a better format then .bin.gz that would increase speed?

    In addition, it seems some of the general tips for improving overall performance are:

    1. Keep models in memory, to avoid re-loads
    2. Reduce beam size if applicable
    3. Use wrapper classes

    I'm wondering if there are other helpful hints to reducing wait time and improve overall performance. Thanks in advance!

     
  • Joern Kottmann

    Joern Kottmann - 2010-03-26

    Hello, you can modify the source code and test how long it takes to load a model with gz compression and without, but I doubt that it makes a big difference. If you are really concerned about the model loading time I would suggest to use a profiler to see where the most time loading a model is spent. Maybe we can then come up with some kind of improvement.

    Sure, keeping the model in memory all the time is important, the model can also be shared between multiple threads in case you have a multi-core machine.

    I also think it runs faster on a 64 bit cpu, but I have never measured it.

    What do you mean with wrapper classes ?
    OpenNLP is a toolkit which is designed to be integrated into an application.

    Jörn

     

Log in to post a comment.