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 217728 - Unnecessary wait and CPU usage building a C++ project
Summary: Unnecessary wait and CPU usage building a C++ project
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
: 207807 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-09-03 09:10 UTC by lcsondes
Modified: 2013-03-12 18:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Profiling data (37.87 KB, application/zip)
2012-09-03 09:10 UTC, lcsondes
Details
Profiling data of 100% CPU usage (173.35 KB, application/zip)
2012-11-06 10:52 UTC, lcsondes
Details
Profiling data of Netbeans 7.3 (36.95 KB, application/zip)
2013-03-04 13:21 UTC, lcsondes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lcsondes 2012-09-03 09:10:11 UTC
Created attachment 123816 [details]
Profiling data

I have a large C++ project, which outputs a .dll. The build and run steps are .bat files (both finish under 2-3 seconds).

However, there's a big pause between the build and run steps (1.nps), and after the run step (2.nps). CPU usage is either very low, or very high during these pauses (this behavior is random).

It looks like most time is spent in CLI Requests Server and W32 File Monitor, with org.netbeans.api.extexecution.ExecutionService coming in as the second. I've attached profiling data taken during these pauses.
Comment 1 Petr Cyhelsky 2012-09-03 10:47:51 UTC
most of the time seems to be spent in:
org.netbeans.modules.cnd.makeproject.MakeLogicalViewProvider.refreshBrokenItems()
reassigning to cnd
Comment 2 lcsondes 2012-10-18 13:30:20 UTC
Raising priority to P2. This problem can stack, causing 100% CPU usage across all cores, and a very sluggish IDE, remaining so for several minutes (or until an IDE restart).
Comment 3 Alexander Simon 2012-10-18 14:14:49 UTC
please provide thread dump of:
"100% CPU usage across all cores for several minutes"
Comment 4 Vladimir Voskresensky 2012-10-18 19:09:55 UTC
fyi, thread dump and profile snapshot http://wiki.netbeans.org/GenerateThreadDump#Profile_Me_Now will help a lot
Comment 5 lcsondes 2012-11-06 10:52:31 UTC
Created attachment 127211 [details]
Profiling data of 100% CPU usage
Comment 6 lcsondes 2012-11-06 10:56:41 UTC
It took a while due to the random nature of the bug, but I could finally take some profiling data when NB was using 100% CPU across all cores (checked with Process Explorer: netbeans64.exe was using the processor, kernel mode usage was negligible).
Comment 7 Vladimir Voskresensky 2012-11-06 13:33:25 UTC
Please, provide your version info (Help->About)
Thanks!
Comment 8 Leonid Lenyashin 2012-11-06 14:05:22 UTC
Waiting for user's info
Comment 9 lcsondes 2012-11-06 17:27:51 UTC
Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)

Help->Check for updates says I'm up to date.
Comment 10 Alexander Simon 2012-11-06 18:03:57 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/f904ebb91983
Comment 11 Quality Engineering 2012-11-07 03:40:48 UTC
Integrated into 'main-golden', will be available in build *201211070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/f904ebb91983
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #217728 Unnecessary wait and CPU usage building a C++ project
Comment 12 Alexander Simon 2012-12-04 07:50:29 UTC
*** Bug 207807 has been marked as a duplicate of this bug. ***
Comment 13 lcsondes 2013-03-04 13:21:18 UTC
Created attachment 132149 [details]
Profiling data of Netbeans 7.3

Profiling data of the same issue in Netbeans 7.3
Comment 14 lcsondes 2013-03-04 13:23:33 UTC
The issue is still present in Netbeans 7.3, although it has a lesser impact now.

Attached profiling data.

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b03
System: Windows 7 version 6.1 running on amd64; Cp1252; en_GB (nb)
Comment 15 Alexander Simon 2013-03-05 09:35:57 UTC
(In reply to comment #14)
> The issue is still present in Netbeans 7.3, although it has a lesser impact
> now.
> 
Apparently, rest problem is a duplicate of bug #201761.
Comment 16 Vladimir Voskresensky 2013-03-12 18:08:58 UTC
This issue itself was fixed. I've created new one about your current findings #227376