title: Execution time optimization with serial execution of jar and c++ executable
body: <p>I am using co-reference resolution where we are amalgamating various functionality and executing them one by one to get final result. </p>
  
  <p>All executable are from different opensource provider. Implementing all functionalities like NER, POS, Parsing etc are not feasible for now. So I have to use the existing (and Stanford is best suitable for this).</p>
  
  <p>Issue is, it is taking much time to execute all one by one and give result. Around 25-30 seconds</p>
  
  <p><strong>Everytime I execute, it compiles linked files and give output. Is that anyway to reduce this execution time?</strong></p>
  
  <p>All commands are in <code>.sh</code> shell script and I am executing it via python file. </p>
  
  <p>Here are set of commands being executed</p>
  
  <ol>
  <li><p>Getting NER (Named entity recognization)</p>
  
  <p>java -mx700m -cp $1/stanford-ner.jar edu.stanford.nlp.ie.crf.CRFClassifier -loadClassifier $1/classifiers/ner-eng-ie.crf-3-all2008-distsim.ser.gz -textFile $2</p></li>
  </ol>
  
  <p>(java jar file)</p>
  
  <ol start="2">
  <li><p>Getting POS (Part of speech)</p>
  
  <p>java -mx300m -classpath $1/stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTagger -model $1/models/bidirectional-wsj-0-18.tagger -textFile $2</p></li>
  </ol>
  
  <p>(java jar file)</p>
  
  <ol start="3">
  <li><p>Using minipar parse for parsing the text</p>
  
  <p>tools/minipar/pdemo/pdemo -p tools/minipar/data/ &lt; $1 > $1.minipar </p></li>
  </ol>
  
  <p>(c++ executable)</p>
  
  <ol start="4">
  <li><p>Detecting mentions </p>
  
  <p>java MentionDetection $1</p></li>
  </ol>
  
  <p>(class file)</p>
  
  <ol start="5">
  <li><p>java CreateNPSpan $1 $1.pred</p></li>
  </ol>
  
  <p>(class file)</p>
  
  <ol start="6">
  <li><p>creating feature file</p>
  
  <p>java -cp .:edu.mit.jwi.jar CherryPick cr $1</p></li>
  <li><p>cr joint model</p>
  
  <p>tools/svmrank/svm_classify $1 modelrank > $1.entities</p></li>
  </ol>
  
  <p>(c++ executable)</p>
  
  <ol start="8">
  <li><p>Getting response </p>
  
  <p>java MakeResponse $1</p></li>
  </ol>
  
  <p>(classfile)</p>