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 262659 - Indefinite high CPU Usage while typing after requiring module.
Summary: Indefinite high CPU Usage while typing after requiring module.
Status: RESOLVED WORKSFORME
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-02 12:20 UTC by dylanv
Modified: 2016-08-18 13:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
last messages from the IDE (272.45 KB, application/octet-stream)
2016-07-02 12:20 UTC, dylanv
Details
Video of Problem (9.13 MB, application/octet-stream)
2016-07-02 12:34 UTC, dylanv
Details
threaddump1 (30.24 KB, application/octet-stream)
2016-07-11 13:12 UTC, dylanv
Details
threaddump2 (31.43 KB, application/octet-stream)
2016-07-11 13:13 UTC, dylanv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dylanv 2016-07-02 12:20:44 UTC
Created attachment 160233 [details]
last messages from the IDE

I work on a number of massive javascript programs that have very complex webpack/browserify configurations. This is relevant because I have aliases such as require("Application") that don't necessarily exist as a node module, but are configured to point to specific files, so this cannot be statically analysed. Now almost always if i type:

require("Application").widgets<<caret-here>>

there is no problem, but the second I type another dot and attempt to type "IconWidget" aka:

require("Application").widgets.IconWidget<<caret-here>>

The CPU usage maxes out and Netbeans will never recover. Its as if its trying to analyse a massive amount of files, or some internal exception is firing that is preventing it from recovering. This is almost always repeatable in my applications and I cannot figure out what it could be. I have automatic code scanning enabled, but this doesn't seem to affect it and the IDE-logs don't seem to show anything useful either.

Its important to note, that at this point, I am not triggering the autocomplete, and I've tried typing it slower and faster to try and see if the IDE is waiting for me to finish typing before attempting to statically analyse something.
Comment 1 dylanv 2016-07-02 12:34:23 UTC
Created attachment 160234 [details]
Video of Problem

You will notice that the Java process will consume the CPU even when I'm no longer typing. The problem persists even when i type a ';' or continue typing in other files and even close the file all together.
Comment 2 Petr Pisl 2016-07-11 13:04:56 UTC
Could you attach a threaddump, when it consumes the CPU?
http://wiki.netbeans.org/GenerateThreadDump

Thanks.
Comment 3 dylanv 2016-07-11 13:12:58 UTC
Created attachment 160349 [details]
threaddump1
Comment 4 dylanv 2016-07-11 13:13:17 UTC
Created attachment 160350 [details]
threaddump2
Comment 5 Petr Pisl 2016-08-11 08:00:25 UTC
It looks like your project was still scanned. In the dev build there was performance problem during scanning that was fixed a week ago. Could you try newer build. Also I have noticed that you use probably full ide? There were many threads from cnd (c++) modules. Do you use them?
Comment 6 dylanv 2016-08-11 08:12:37 UTC
Hi there

Yeah I use the Full IDE because I also work on C++ projects and a lot of Java projects as well. I cannot remember if I was working on any at the time though, but I do have a couple of .sh scripts in my javascript projects that run sets of gulp commands etc... so I'm not sure if those threads are related to that. I will download the new build (which I do weekly anyways) and give it another go. Thanks.
Comment 7 Petr Pisl 2016-08-11 09:31:45 UTC
Thanks. Let me know, if the problem is still there. And if yes, could you please provide a snapshot of from selfprofiling? http://wiki.netbeans.org/FaqProfileMeNow
Thanks.
Comment 8 dylanv 2016-08-17 21:17:45 UTC
Just letting you know that so far so good, but I haven't directly tested the same issue just yet, so Im going to keep this open, but I promise I will let you know when I try and replicate the exact same problem. This kind of problem was occurring quite regularly for a number of things, and so far its been good to me. xD

Thanks for the patience
Comment 9 Petr Pisl 2016-08-18 13:06:35 UTC
Thanks for your comment. So I close this issue as works for me. It could be fixed earlier. But if you run it again, please reopen. Thanks.