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 256057

Summary: Navigator very slow [was: Code formatting very slow since 8.1 RC1]
Product: javascript Reporter: luislobo
Component: Node.jsAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED    
Severity: normal CC: anebuzelsky, phejl, tmysik
Priority: P1    
Version: 8.1   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Profiler
Another Profile. This time there was only Projects, and two js files open
A third one, just in case
Profile run on NetBeans 8.1 final version

Description luislobo 2015-10-20 16:40:18 UTC
Since 8.1 RC 1, code formatting has become very slow. On 8.1 beta it was running fine.

This is for Node.js code.
Comment 1 luislobo 2015-10-20 16:41:10 UTC
BTW, it happens randomly
Comment 2 Petr Pisl 2015-10-21 11:50:39 UTC
I can not reproduce it. 

Could you provide a profiling snapshot? 
http://wiki.netbeans.org/FaqProfileMeNow

Please reopen the bug, when the snapshot is attached. 
Thanks.
Comment 3 luislobo 2015-10-24 00:59:36 UTC
Created attachment 156944 [details]
Profiler
Comment 4 luislobo 2015-10-24 01:00:15 UTC
I've added a profiler. I cannot easily reproduce the issue, I hope this one helps.
Comment 5 Petr Pisl 2015-10-26 13:26:47 UTC
According the snapshot, the formatting is waiting until structure scanner (navigator) finish its job.
Comment 6 Petr Pisl 2015-10-26 16:44:44 UTC
Could you try to switch off navigator and try to reproduce it? Or could you provide me a file, where it can happen?
Comment 7 luislobo 2015-11-05 21:26:10 UTC
Created attachment 157170 [details]
Another Profile. This time there was only Projects, and two js files open

Another Profile. This time there was only Projects, and two js files open.
It took a while, then a "formatting please wait" dialog appeared. and finally formatted.

Now I'm using RC2
Comment 8 luislobo 2015-11-05 21:38:00 UTC
Created attachment 157171 [details]
A third one, just in case
Comment 9 luislobo 2015-11-09 20:08:13 UTC
Created attachment 157236 [details]
Profile run on NetBeans 8.1 final version
Comment 10 Petr Pisl 2015-12-28 14:59:52 UTC
Is there a way, how can I reproduce it? Could you somehow share the project?

And If you switch off the navigator window, still happened?
Comment 11 Petr Hejl 2016-07-26 08:06:24 UTC
I do not see any formatter code in the latest snapshot. It looks like lucene query is slow for some reason. The original call is coming from navigator.

Reporter, can you try the latest daily build? Would be great if you could provide a file or project for testing.
Comment 12 Petr Pisl 2016-08-01 12:58:14 UTC
I have tried to improve performance of the method ModelUtils.findPrototypeChain, because last two snapshots the CPU spend here a lot of time. 
http://hg.netbeans.org/web-main/rev/aa4228176f41
Comment 13 Quality Engineering 2016-08-02 01:58:48 UTC
Integrated into 'main-silver', will be available in build *201608020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/aa4228176f41
User: Petr Pisl <ppisl@netbeans.org>
Log: #256057 - Navigator very slow [was: Code formatting very slow since 8.1 RC1]