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 225865

Summary: Editing a .js file, every character I type NetBeans make a "pause" with busy cursor to check autocomplete...
Product: javascript Reporter: ecerichter
Component: EditorAssignee: Petr Pisl <ppisl>
Status: VERIFIED FIXED    
Severity: normal CC: issues, mmirilovic, pjiricka, vriha
Priority: P1 Keywords: PERFORMANCE
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: IDE log
video of the issue in action!
profiler snapshot
JavaScript editor jar with the possible patch
Navigator seems to be working well. But title is weird

Description ecerichter 2013-02-07 21:42:38 UTC
Product Version = NetBeans IDE 7.3 RC1 (Build 201301240957)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_13
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

I've a very fast machine (AMD Buldozer FX 5120 with 8Gb), and it is almost impossible to type in JavaScript editor, because for every character is makes a pause with "busy" cursor to check autocomplete options.

Example of code I'm typing:

function getContextPath() {
  var path = |
  return document.location.pathname;
}


(cursor is at position of |). Every character make a half second pause for autocomplete check...


Regards,

Edson
Comment 1 ecerichter 2013-02-07 21:42:51 UTC
Created attachment 131121 [details]
IDE log
Comment 2 ecerichter 2013-02-07 21:47:46 UTC
Created attachment 131122 [details]
video of the issue in action!
Comment 3 ecerichter 2013-02-07 22:54:27 UTC
Repeteable in RC2.

I suspect this issue is related to issue 225837.

Regards,

Edson
Comment 4 Petr Pisl 2013-02-07 23:37:29 UTC
Could you please attach the ide snapshot? Just for a few seconds. How to do it is described here: http://wiki.netbeans.org/FaqProfileMeNow

Thanks
Comment 5 Petr Pisl 2013-02-07 23:49:25 UTC
Could you also try, when you close the navigator?. Does it has the same symptoms with closed navigator? Thanks
Comment 6 ecerichter 2013-02-08 01:09:46 UTC
Created attachment 131127 [details]
profiler snapshot
Comment 7 ecerichter 2013-02-08 01:12:07 UTC
(In reply to comment #5)
> Could you also try, when you close the navigator?. Does it has the same
> symptoms with closed navigator? Thanks

Seems you are right: having navigator closed, doesn't show the lag time.
Also, I've noticed that navigator title blink with "null - Navigator", like if everytime the navigator would be trying to parse the incomplete javascript I'm working on.
Comment 8 Marian Mirilovic 2013-02-08 08:05:54 UTC
Under investigation as potential NB 7.3 stopper ....
Comment 9 Vladimir Riha 2013-02-08 08:07:11 UTC
Petre, do you think that fix for issue 222130 could help with that? I do see the busy cursor, but it has no visible affect on typing for me (JS file with ~3k lines)
Comment 10 Petr Pisl 2013-02-08 08:18:05 UTC
Vlado, I'm sure that it should help:). I need to look through the snapshot.
Comment 11 Petr Pisl 2013-02-08 08:34:56 UTC
To reporter: Looking through the ide snapshot, it really caused by refreshing the navigator. When the navigator is refreshing, then some types are resolved through the index. Which means that is touch the disk. From the napshot it looks like you are working on a network fs, is it true?
Comment 12 Petr Pisl 2013-02-08 08:50:18 UTC
Created attachment 131136 [details]
JavaScript editor jar with the possible patch

@reporter: I'm attaching a jar, which is newer JS editor with the fix for issue #222130 . Could you please replace the original jar in your RC1 build. It's located in ${installdir}/ide/modules and try whether it helps, when the navigator is open. Thanks very much.
Comment 13 ecerichter 2013-02-08 11:47:51 UTC
(In reply to comment #11)
> To reporter: Looking through the ide snapshot, it really caused by refreshing
> the navigator. When the navigator is refreshing, then some types are resolved
> through the index. Which means that is touch the disk. From the napshot it
> looks like you are working on a network fs, is it true?

No. It is possible that anti-virus has some activity. But I do use SATA II 7200 rpm Seagate disks in a brand new machine.
Comment 14 ecerichter 2013-02-08 11:48:33 UTC
(In reply to comment #12)
> Created attachment 131136 [details]
> JavaScript editor jar with the possible patch
> 
> @reporter: I'm attaching a jar, which is newer JS editor with the fix for issue
> #222130 . Could you please replace the original jar in your RC1 build. It's
> located in ${installdir}/ide/modules and try whether it helps, when the
> navigator is open. Thanks very much.

I'll give a try and get back ASAP.

Thanks,

Edson
Comment 15 ecerichter 2013-02-08 12:10:49 UTC
(In reply to comment #14)
> (In reply to comment #12)
> > Created attachment 131136 [details]
> > JavaScript editor jar with the possible patch
> > 
> > @reporter: I'm attaching a jar, which is newer JS editor with the fix for issue
> > #222130 . Could you please replace the original jar in your RC1 build. It's
> > located in ${installdir}/ide/modules and try whether it helps, when the
> > navigator is open. Thanks very much.
> 
> I'll give a try and get back ASAP.
> 
> Thanks,
> 
> Edson

Applying the patch resulted in autocomplete no working any more, and the following stack trace:

java.lang.NoSuchMethodError: org.netbeans.modules.javascript2.editor.classpath.ClassPathProviderImpl.getJsStubs()Ljava/util/List;
	at org.netbeans.modules.javascript2.editor.model.impl.JsElementImpl.isInternalFile(JsElementImpl.java:196)
	at org.netbeans.modules.javascript2.editor.model.impl.JsElementImpl.isPlatform(JsElementImpl.java:190)
	at org.netbeans.modules.javascript2.editor.JsCompletionItem.getRhsHtml(JsCompletionItem.java:115)
	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.getRightHtmlText(GsfCompletionItem.java:199)
	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem.getPreferredWidth(GsfCompletionItem.java:516)
	at org.netbeans.modules.editor.completion.CompletionJList$RenderComponent.getPreferredSize(CompletionJList.java:382)
	at org.netbeans.modules.editor.completion.CompletionJList.setData(CompletionJList.java:167)
	at org.netbeans.modules.editor.completion.CompletionScrollPane.setData(CompletionScrollPane.java:127)
	at org.netbeans.modules.editor.completion.CompletionLayout$CompletionPopup.show(CompletionLayout.java:384)
	at org.netbeans.modules.editor.completion.CompletionLayout.showCompletion(CompletionLayout.java:143)
	at org.netbeans.modules.editor.completion.CompletionImpl$7.run(CompletionImpl.java:1016)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:727)
	at java.awt.EventQueue.access$200(EventQueue.java:103)
	at java.awt.EventQueue$3.run(EventQueue.java:688)
	at java.awt.EventQueue$3.run(EventQueue.java:686)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:697)
	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Comment 16 ecerichter 2013-02-08 12:16:54 UTC
Created attachment 131145 [details]
Navigator seems to be working well. But title is weird

Ok, applying patch on RC2 worked.
Nevertheless, navigator window says "null - Navigator", not sure if it is the same issue or if I should open a new one.
See attached screenshot for reference.
Comment 17 ecerichter 2013-02-08 12:18:36 UTC
(In reply to comment #16)
> Created attachment 131145 [details]
> Navigator seems to be working well. But title is weird
> 
> Ok, applying patch on RC2 worked.
> Nevertheless, navigator window says "null - Navigator", not sure if it is the
> same issue or if I should open a new one.
> See attached screenshot for reference.

I'll work in RC2 only by today, and keep the patch in place.
During next 8 hours I'll be working with NB, and be able to answer if the fix is effectively as I hope.

Thanks,

Edson
Comment 18 Vladimir Riha 2013-02-08 12:18:58 UTC
The "null" is reported as issue 216639.
Comment 19 Petr Pisl 2013-02-10 20:50:52 UTC
The null problem was here before as well. It's infrastructure problem and different issue as Vlada mentioned. Anyway thanks for your cooperation.
Comment 20 Petr Pisl 2013-02-11 10:35:55 UTC
I have transplanted fix for issue #222130 into releases73 branch that should fix this. http://hg.netbeans.org/releases/rev/98d8757b80ec
Comment 21 Vladimir Riha 2013-02-14 10:35:09 UTC
verified in 7.3 by trying issue 222130

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_15; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_15-b02
System: Linux version 3.2.0-35-generic-pae running on i386; UTF-8; en_US (nb)