matthiasblaesing commented on PR #6789: URL: https://github.com/apache/netbeans/pull/6789#issuecomment-1839259887
For the following I regrettably can't provide numbers, but I think I can trace it back to the changes this is a followup for: I noticed that NetBeans became to feel sluggish at work (Windows Laptop) when invoking "Run file" in a semi-big maven project and editing the `pom.xml`. The project is a dropwizard project and pull-in jersey, jetty, jackson, so a not to small number of modules. What I noticed is that the UI froze for a few seconds after each "Run file" invocation. UI freezes indicate something heavy blocking the EDT. Indeed, when you add `assert !SwingUtilities.isEventDispatchThread();` to `org.netbeans.modules.maven.NbMavenProjectImpl.getFreshOriginalMavenProject()` (or a breakpoint there), this is hit when: - you invoke "Run file"-Method - you modify the `pom.xml` and save it The source is here: `MavenProjectNode#getShortDescription` https://github.com/apache/netbeans/blob/ca7b58b0ab653f09e9fb097549fa19a40b89f742/java/maven/src/org/netbeans/modules/maven/nodes/MavenProjectNode.java#L183 Stacktrace: ``` java.lang.AssertionError at org.netbeans.modules.maven.NbMavenProjectImpl.getFreshOriginalMavenProject(NbMavenProjectImpl.java:479) at org.netbeans.modules.maven.problems.MavenModelProblemsProvider.doGetProblems1(MavenModelProblemsProvider.java:165) at org.netbeans.modules.maven.problems.MavenModelProblemsProvider.doGetProblems(MavenModelProblemsProvider.java:152) at org.netbeans.modules.maven.problems.MavenModelProblemsProvider.getProblems(MavenModelProblemsProvider.java:131) at org.netbeans.spi.project.ui.support.UILookupMergerSupport$ProjectProblemsProviderImpl.getProblems(UILookupMergerSupport.java:274) at org.netbeans.modules.maven.nodes.MavenProjectNode.getShortDescription(MavenProjectNode.java:183) at org.netbeans.modules.maven.nodes.MavenProjectNode$2$1.run(MavenProjectNode.java:92) at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136) [catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90) ``` There interesting bit is, that `doGetProblems1` is called with `sync = false` in this case. The IMHO correct expectation would be, that the call immediately returns, but `getFreshOriginalMavenProject` seems to block. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
