Menu

#57 codecoverage takes very long to generate the report

open
5
2004-05-04
2004-05-04
No

I have about 220 tests for about 300 classes.
It takes more than 5 minutes to generate the report!
It seems that transform times grow during report
generation process. In the beginning there are a lot of
small time entries:

Transform time: 2125ms
Transform time: 188ms
Transform time: 110ms
Transform time: 78ms
Transform time: 31ms
Transform time: 32ms
Transform time: 0ms
Transform time: 250ms
Transform time: 16ms
.....

at the end all times are more than 200ms:
.....
Transform time: 703ms
Transform time: 219ms
Transform time: 500ms
Transform time: 453ms
Transform time: 1281ms
Transform time: 937ms
Transform time: 735ms
Transform time: 235ms
Transform time: 2219ms
Transform time: 1031ms
Transform time: 500ms
Transform time: 203ms
Transform time: 2171ms
Transform time: 3157ms

See the attached file for full trace.

Wonder if this is an indicator of resource leak, can be
related to bug [ 903836 ] Source report: Out of Memory
Exception.

Let me know if I can provide more information.
Andriy

Discussion

  • Andriy Palamarchuk

    codecoverage output

     
  • Andriy Palamarchuk

    Logged In: YES
    user_id=437388

    In the example above I generated both - line and function
    stats. It takes 1.5 minutes less to generate only line
    report. Note, this time difference is for complete builtds -
    compilation+test+generation, not the generation alone.
    Matt, even if you won't have time fix the bug or won't be
    able to reduce the generation times substantially at least
    could you include this information as a tip to your
    documentation/web site.

    Regards,
    Andriy

     
  • Matt Albrecht

    Matt Albrecht - 2004-06-08

    Logged In: YES
    user_id=171822

    I've done a detailed analysis of this.

    The performance bottleneck was with the XSL stylesheet -
    whenever it encountered a class that had lots of uncovered
    source lines, it would take a long time.

    I've made modifications to the XML source file generator and
    the XSL stylesheet that improves performance - I've seen
    over 2x improvement my larger files. Though this isn't an
    order of magnitude improvement, it's a start.

    These changes are in CVS now. I should have another beta
    available by the end of the week.

     
  • Matt Albrecht

    Matt Albrecht - 2004-06-08

    Logged In: YES
    user_id=171822

    Here's a comparison that I've made (including both XML
    source creation and XSL transformation):

    old new
    ------ -----
    35 35
    36 38
    37 39
    37 40
    41 42
    42 46
    43 46
    44 46
    45 47
    48 47
    49 51
    49 54
    50 54
    52 56
    52 56
    54 59
    56 60
    57 60
    58 61
    63 61
    64 62
    69 66
    74 68
    77 74
    80 75
    81 77
    81 79
    84 81
    86 83
    88 84
    88 85
    91 91
    97 92
    102 93
    104 93
    107 94
    115 95
    118 102
    119 103
    125 106
    128 107
    133 109
    146 114
    170 119
    180 119
    184 137
    185 153
    189 160
    213 162
    213 163
    231 168
    238 170
    240 177
    247 181
    256 181
    290 183
    292 211
    295 214
    299 214
    312 226
    312 246
    312 247
    318 262
    330 273
    335 292
    344 294
    397 298
    404 311
    407 320
    426 338
    497 343
    509 346
    545 347
    626 353
    650 366
    662 375
    709 376
    734 386
    756 406
    781 407
    807 407
    919 414
    993 419
    1004 472
    1014 478
    1082 479
    1092 491
    1182 511
    1238 513
    1272 549
    1714 660
    2333 972
    3571 1053
    5294 1153
    6503 1338
    11578 6893

    As you can see, the smaller files don't see much of a change
    (roughly 5% slowdown), but for files that used to take > 100
    ms, there's about a 10% increase in performance. For 5
    second files, there was a 70% - 350% increase in performance.

     
  • Matt Albrecht

    Matt Albrecht - 2004-06-09

    Logged In: YES
    user_id=171822

    The current fix for this is now available on the Sf
    downloads page, as beta 3.

     
  • Andriy Palamarchuk

    Logged In: YES
    user_id=437388

    The changes work for the beta 3. The fix shaved almost 2
    minutes of my 9-min build process. Note, the time also
    includes running unit tests etc.

    Thank you for the fix. Look forward for the release.