Sonar

Improve memory consumption of maven collectors

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 1.5
  • Fix Version/s: 1.9.1
  • Component/s: Maven Plugin
  • Labels:
    None
  • Number of attachments :
    0

Description

Collectors embedded in maven plugins usually parse XML files to insert measures in database. Parsing is done with DOM, so xml trees are fully instanciated in memory. It's performant on small files only, but not on projects like :

  • 6'000 classes
  • a checkstyle file of 50Mo
  • a PMD file of 30Mo
  • a cobertura file of 20 Mo
  • a JavaNCSS file of 7Mo

The solution is to use SAX, for example thanks to XPP3 parser.

Issue Links

Activity

Hide
Simon Brandhof added a comment -

First tests on StAX parsing are successful on Emma and PHP plugins. StAX implementation is Codehaus Woodstox.

Show
Simon Brandhof added a comment - First tests on StAX parsing are successful on Emma and PHP plugins. StAX implementation is Codehaus Woodstox.
Hide
Cédric Munger added a comment -

Cobertura, clover, emma, pmd, findbugs and checkstyle maven collectors have been migrated to the new Stax based API.
Speed and memory usage should be greatly improved.

Show
Cédric Munger added a comment - Cobertura, clover, emma, pmd, findbugs and checkstyle maven collectors have been migrated to the new Stax based API. Speed and memory usage should be greatly improved.

People

Vote (5)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: