title: How to make lcov perform faster?
body: <p>I'm having performance issues with lcov.</p>
  
  <p>I'm executing a program in seven different profiles, collecting the coverage for each of them and then merging the coverage profile with lcov: </p>
  
  <pre><code>lcov --rc lcov_branch_coverage=1 -a coverage_1.dat -a coverage_2.dat -a coverage_3.dat -a coverage_4.dat -a coverage_5.dat -a coverage_6.dat -a coverage_7.dat -o coverage_full.dat
  </code></pre>
  
  <p>However, this is excruciatingly slow. It takes about 10 minutes to combine my 7 profiles, this is actually longer than it takes to compile and run the 7 profiles. Each dat file is about 1M lines. </p>
  
  <p>The <code>lcov --combine</code> and <code>lcov --remove</code> steps are very slow as well. Around 45 seconds for each of them. </p>
  
  <p>Is there any way to speedup this combine step ? I can use several threads if necessary and I have got plenty of memory. If there are other tool that are able to do this combination correctly, I'd be interest as well (I've tried to convert the files to Cobertura and do the merge with a Python script I found, but it crashes). </p>
  
  <p>If there is an alternative to lcov completely, I'm also interested. I've been using gcovr, but with it, I have to use several other tools to do the combination and it is not optimal, but it is much faster. </p>