[ 
https://issues.apache.org/jira/browse/NETBEANS-4037?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17063229#comment-17063229
 ] 

Jaroslav Tulach edited comment on NETBEANS-4037 at 3/20/20, 10:26 AM:
----------------------------------------------------------------------

Problem with GlobalPathRegistry is that once you decide to debug NetBeans Ant 
project, it probably builds itself and updates one of the JARs in the NetBeans 
nbbuild/netbeans directory - and that is considered a change in 
GlobalPathRegistry!? That is strange, as the JAR still remains there. I'd start 
by fixing this. Here is my proposal:

https://github.com/JaroslavTulach/netbeans/pull/new/jtulach/GlobalClassPath

Yes, the fact that debugger calls into the registry multiple times should 
probably not be considered problem of debugger. Ideally just the first call 
recomputes the GlobalPathRegistry and the others just wait for the 
recomputation to be done. CCing Tomáš Zezula, as this seems to be his area of 
expertise.

An interesting observation. One call to:
{code:java}
org.netbeans.api.java.classpath.GlobalPathRegistry.removeTmpSFBQListeners()
{code}
results in more than 400 calls taking more than 16s to
{code:java}
org.netbeans.api.java.queries.SourceForBinaryQuery$Result2.removeChangeListener()
{code}


was (Author: jtulach):
Problem with GlobalPathRegistry is that once you decide to debug NetBeans Ant 
project, it probably builds itself and updates one of the JARs in the NetBeans 
nbbuild/netbeans directory - and that is considered a change in 
GlobalPathRegistry!? That is strange, as the JAR still remains there. I'd start 
by fixing this. I have already done some experiments.

Yes, the fact that debugger calls into the registry multiple times should 
probably not be considered problem of debugger. Ideally just the first call 
recomputes the GlobalPathRegistry and the others just wait for the 
recomputation to be done. CCing Tomáš Zezula, as this seems to be his area of 
expertise.

An interesting observation. One call to:
{code:java}
org.netbeans.api.java.classpath.GlobalPathRegistry.removeTmpSFBQListeners()
{code}
results in more than 400 calls taking more than 16s to
{code:java}
org.netbeans.api.java.queries.SourceForBinaryQuery$Result2.removeChangeListener()
{code}

> Debugger slow - taken profiler snapshots
> ----------------------------------------
>
>                 Key: NETBEANS-4037
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-4037
>             Project: NetBeans
>          Issue Type: Bug
>          Components: debugger - Java
>    Affects Versions: 8.2, 11.1, 11.2, 11.3
>            Reporter: matteodg
>            Assignee: Jan Lahoda
>            Priority: Major
>              Labels: performance
>             Fix For: 12.0
>
>         Attachments: 
> org.netbeans.modules.debugger.jpda.ui.SourcePath.annotate.npss, 
> org.netbeans.modules.debugger.jpda.ui.SourcePath.getURL.npss
>
>
> We have a pretty big NetBeans Platform Application (~180 modules and 5 
> suites) and when the debugger reaches the first breakpoint it got stuck: the 
> tabs Debugging, Variables, Breakpoints, etc. are all with a "Please wait..." 
> node and with the NetBeans sampler I took a few snapshots highlighting it is 
> spending a lot of time on calls like:
>  * {{org.netbeans.modules.debugger.jpda.ui.SourcePath.getURL()}}
>  * {{org.netbeans.modules.debugger.jpda.ui.SourcePath.annotate()}}
> which at the end boil down to a lot of calls like:
>  * java.util.concurrent.CopyOnWriteArrayList.remove()
>  * java.io.File.isFile()
> Attached the snapshots.
> Then if I press Continue the debugger remain stuck: now Pause and Continue 
> buttons in the toolbar are disabled...
> I kept close and restarting NetBeans but no luck... I remember got this 
> behavior even with NB 8.2, sometimes though it goes through and I'm able to 
> debug, but very rarely!
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to