This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244996 - [Coverage] Code Coverage makes Netbeans GUI extremely sluggish
Summary: [Coverage] Code Coverage makes Netbeans GUI extremely sluggish
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
: 214947 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-06-11 07:53 UTC by tomzi
Modified: 2014-07-28 06:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
.npss file attached from NetBeans (2.19 MB, application/x-npss)
2014-06-11 07:54 UTC, tomzi
Details
patch1 (4.50 KB, patch)
2014-07-18 14:24 UTC, rasa.silva
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tomzi 2014-06-11 07:53:54 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Linux version 3.5.0-49-generic running on amd64
Java; VM; Vendor = 1.7.0_60
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.60-b09
Comment 1 tomzi 2014-06-11 07:54:55 UTC
Created attachment 147644 [details]
.npss file attached from NetBeans

.npss file
Comment 2 tomzi 2014-06-11 08:03:59 UTC
I attached a selfsampler. 
Steps to reproduce:
1) Add Coverage section to pom file:
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.0.201403182114</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>                
        </profile>        
2.) Choose 'Set Configuration'/coverage (see profileId above) on the project you want to use the coverage and compile it once.
3.) Select the newly appeared menu 'Code Coverage/Show Report' on the project you want to see the coverage.
4.) Select 'Run All Tests' on the Report page.

Actual:
After the Build the whole Netbeans GUI and Editor is extremely sluggish, meaning eg. clicking a menu takes approx. 1 sec or typing into the editor takes very long and so on.

Expected:
Editor works normal

5.) If I click 'Clear/Clear Results' in the Coverage panel on the lower part of the editor, then everything works like normal.
Comment 3 rasa.silva 2014-07-01 08:51:06 UTC
I confirm this (100% reproducible). When I open the coverage window, the CPU goes to about 25% and stays there. If I close the window, CPU goes back to normal.
Comment 4 rasa.silva 2014-07-18 14:24:41 UTC
Created attachment 148139 [details]
patch1

In attach, a patch that seems to fix the problem without side-effects.
The diff has two changes:
1. update source level from 1.6 to 1.7
2. Fix the bug itself by removing the call to resultsUpdated() in setEnabled() that seems to cause a loop between CoverageManager and MavenCoverageProvider.
Comment 5 Tomas Stupka 2014-07-21 14:20:42 UTC
thanks for the patch

not sure who owns gsf.coverage, so will apply 

feel free to reopen in case problem should prevail ...
Comment 6 Tomas Stupka 2014-07-21 14:22:49 UTC
fixed in core-main #f0ad426467d7
Comment 7 Quality Engineering 2014-07-23 02:09:41 UTC
Integrated into 'main-silver', will be available in build *201407230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f0ad426467d7
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #244996 - [Coverage] Code Coverage makes Netbeans GUI extremely sluggish
Comment 8 Martin Entlicher 2014-07-28 06:42:34 UTC
*** Bug 214947 has been marked as a duplicate of this bug. ***