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 192184 - High CPU use caused by suspended "Checking for external changes" task
Summary: High CPU use caused by suspended "Checking for external changes" task
Status: RESOLVED DUPLICATE of bug 191265
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0
Hardware: Macintosh Mac OS X
: P2 normal with 2 votes (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 17:21 UTC by AIML_Engr
Modified: 2014-04-25 07:12 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Snapshot of high cpu (14.25 KB, application/octet-stream)
2010-11-23 18:31 UTC, AIML_Engr
Details
High CPU without task running (17.81 KB, application/octet-stream)
2010-11-24 15:35 UTC, AIML_Engr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description AIML_Engr 2010-11-19 17:21:09 UTC
In 6.9.1, Netbeaans will often start using mass amounts of CPU (127% on my 2-core Mac). There is also a task of "Checking for external changes [Suspended]" in the lower right corner. I could disable external scanning, but then I would have to do it manually. Attached is snapshot of example high use. You can see it's running many file methods, though the task is "suspended".
Comment 1 Marian Mirilovic 2010-11-22 14:09:54 UTC
No attachment, please attach the data you promised and reopen. Thanks in advance.
Comment 2 AIML_Engr 2010-11-23 18:31:59 UTC
Created attachment 103257 [details]
Snapshot of high cpu
Comment 3 AIML_Engr 2010-11-23 18:34:31 UTC
Added snapshot and reopened
Comment 4 AIML_Engr 2010-11-24 15:35:46 UTC
Created attachment 103294 [details]
High CPU without task running

This is a snapshot of the same high CPU use without a task running.
Comment 5 AIML_Engr 2010-11-24 15:43:54 UTC
So I cleared the cache, and deactivated Subversion plugin as suggested by an old bug. After allowing NB to re-index, the same problem came back, but without a task this time. According to the snapshot, it looks like it's doing mass amounts of file operations. 

Could this be related to versioning, specifically Mercurial? The (single) project open when snapshot is taken is not a Mercurial repository, but other local projects are, like NB main.
Comment 6 AIML_Engr 2010-11-24 16:59:21 UTC
This is the end of the log when the CPU starts spiking:


INFO [HtmlCaretAwareSourceTask]: ParserResultTask.run(...) called with null SchedulerEvent argument.
INFO [HtmlCaretAwareSourceTask]: ParserResultTask.run(...) called with null SchedulerEvent argument.
INFO [HtmlCaretAwareSourceTask]: ParserResultTask.run(...) called with null SchedulerEvent argument.
INFO [HtmlCaretAwareSourceTask]: ParserResultTask.run(...) called with null SchedulerEvent argument.
INFO [org.netbeans.core.windows.persistence]: [PersistenceManager.getTopComponentForID] Problem when deserializing TopComponent for tcID:'CoverageReportTopComponent'. Reason: Top component CoverageReportTopComponent could not be located or loaded from Components folder.
WARNING [org.netbeans.modules.editor.impl.KitsTrackerImpl]: Ambiguous mime types for editor kit implementation class: class org.netbeans.modules.csl.core.CslEditorKit; mime types: [text/x-php5, text/x-json, text/x-css, text/x-yaml, text/javascript]
INFO [HtmlCaretAwareSourceTask]: ParserResultTask.run(...) called with null SchedulerEvent argument.

BTW, this may be a duplicate of bug#191265
Comment 7 Marian Mirilovic 2010-11-25 07:34:32 UTC
WHat type of projects you'd been working on ?
Comment 8 AIML_Engr 2010-11-26 16:22:27 UTC
PHP project. FWIW, this condition appears to be lessened somewhat in the nightly build (201011240001).
Comment 9 Petr Pisl 2011-02-28 15:32:04 UTC
Do you have the same experience with Beta2.

According the first and the second snapshot is the bulk of the time spent in Java Task Provider where java.util.collections.sort spends half of the time. Could yo try to switch off the task list?
Comment 10 Petr Pisl 2011-03-01 10:25:02 UTC
According to the snapshot this issue has the same symptons as issue #191265

*** This bug has been marked as a duplicate of bug 191265 ***
Comment 11 davidkarlin 2014-02-11 11:37:41 UTC
I don't think this bug is a duplicate of 191265, as marked. In bug 191265, there is no bottom right hand corner message, whereas in this bug (which I am experiencing at the moment), there is a clear "Checking for external changes - Suspended" message.

I can't currently tell whether Netbeans is telling the truth and that the checking process is indeed suspended (in which case I have to do something drastic like reinstalling) or whether it's simply lying and that all I need to do is to wait for the high CPU usage to finish (currently 45 threads at 119% CPU time).

Symlinks, as mentioned in 191265, do not feature in my setup.

Therefore, I think this bug should be unmarked as a duplicate. Even if the high CPU usage can't be fixed, I think the messaging should be. Or if it's actually a hang, it should be - I'm currently on an hour of CPU time and counting.
Comment 12 karl_r 2014-04-13 21:34:14 UTC
I have this exact problem in the latest version of 8.0 with all my PHP projects.

- Quite a few projects open with a lot of files. Everything is fine and works as expected for a while, then suddenly the CPU usage spikes to 100% (on one core) and stays like that for hours on end. When it happens, it says "Checking for external changes (Suspended)" on the bottom right. Pressing the cancel button next to it will temporarily remove the message but the CPU usage remains, and the message returns a few seconds later.

- Disabling "check for external changes" fixes the problem, but working without that feature is pretty annoying.

- Win7 64 bit, 64 bit Netbeans.

- I don't have any symlinks

- Netbeans works exactly as normal while this is going on, no speed degradation
Comment 13 Petr Pisl 2014-04-14 07:26:16 UTC
Hi, probably it would be better to open new bug for NB 8.0. This bug is old and the issue can have different causation. 

Anyway, it would be great if you can add a snapshot, when the processor is heavily used. How to create a snapshot is described here http://wiki.netbeans.org/FaqProfileMeNow and more generally about the slow ide thre is a document here: http://wiki.netbeans.org/FaqSlowNetBeans
Comment 14 Ondrej Brejla 2014-04-25 07:12:16 UTC
As Petr wrote, do not reopen 4 years old issues. Especially duplicate. Thanks.

*** This bug has been marked as a duplicate of bug 191265 ***