Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there any way to get the tag to use less heap?

I am running a <clover-merge> Ant tag within a 1.7.0_04 JVM with 8 GB of heap. We were running 1.7.0_02 a week ago, but don't know if this is relevant. We are running out of heap, and have found that we can resolve this by increasing the JVM to 10 GB of heap. Given the number of builds we run, we can't afford to give them all 10 GB heap.

Is there a way to tune the <clover-merge> tag so that it uses less heap, perhaps by doing some work on disk rather than in core?

1 answer

0 votes

Hi Robert,

The majority of memory consumption in <clover-merge> is related with merging per-test coverage files. So, as a first step I would suggest to check if it's possible to reduce number of "clover.db*.s" files produced in your build.

Ways to achieve this:

  • check if you need per-test code coverage in your projects at all - while this feature is very useful and I really recommend using it, there may be a case that you actually need a high-level coverage overview report, in which per-test coverage is irrelevant (a PDF or an XML report, for instance)
  • check if you don't have outdated coverage recording files from previous builds in your build workspace as Clover will have to unnecessarily process them (in general, Clover database and recordings don't have to be kept after a build)
  • check if it's possible to reduce number of <javac> and <groovyc> calls in your project - every such call causes that classes instrumented by Clover will produce a separate set of coverage recording files


As a next step I would suggest to experiment with various garbage collectors and GC settings for <clover-merge>. In general, when Clover merges per-test recordings, it creates a vast amount of short-living long[] arrays. Standard GC settings are usually not the most optimal - in various tests with a profiler I've seen unnecessary growth of a heap size, because GC was not able to free memory fast enough. Increasing size of a young generation as well as running full garbage collection more aggressively may help.



Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Jira Cloud Performance Improvements

Hello everyone, I am a product manager in the Jira Cloud team focused on making sure our customers have a delightful experience using our products. Towards that goal, one of the areas which is extr...

178 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you