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.
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.
BTW, it happens randomly
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.
Created attachment 156944 [details] Profiler
I've added a profiler. I cannot easily reproduce the issue, I hope this one helps.
According the snapshot, the formatting is waiting until structure scanner (navigator) finish its job.
Could you try to switch off navigator and try to reproduce it? Or could you provide me a file, where it can happen?
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
Created attachment 157171 [details] A third one, just in case
Created attachment 157236 [details] Profile run on NetBeans 8.1 final version
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?
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.
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
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]