I’ve figured out what about my system triggers this delay on Open Project.
I am working from home and have a couple different VPNs that I connected to
for work.  But I don’t always have them connected, and I’m not always
connecting to both of them when I do.  On each of these I have a mapped
network drive.  When the VPN is not connected the network drive letter is
offline.  Only when one of the network drivers is offline does the Open
Project dialog take exceptionally long to appear.  I still think this is
worth addressing, as it is not a problem is any other “Open…” dialogs of
software I use.

Note that the folder that the Open Project dialog initially shows, is not
on any of those network drives or showing any data from them.  It is
somewhere on my local SSD.  NetBeans Open Project doesn't need to ever try
to access those drives.  At least not until I actually navigate to "This
PC" or something like that.  The "Open file..." dialog does not have this
issue.

I have collected snapshots in VisualVM that I have attached to this email.


Regards,

Scott


On Nov 5, 2021, at 5:08 PM, Svata Dedic <[email protected]> wrote:

Scott,

if you use VisualVM, you can save the sampler data: press Snapshot (last
icon above the data table), and then on the Snapshot tab that appears,
there is "Export Snapshot Data" icon (again above the data table, looks
like a diskette). The benefit of that is that we can do drill-down to the
hotspots with that data file.

-S.

Dne 05. 11. 21 v 18:19 Scott Palmer napsal(a):

VisualVM indicates that "W32 File Monitor" is constantly using CPU,
regardless of what is happening in the IDE, like it is in a busy loop.
org.netbeans.modules.masterfs.watcher.windows.WindowsNotifier$1.run
()30,109 ms (100%)30,109 ms (100%)
  org.netbeans.modules.masterfs.watcher.windows.WindowsNotifier.access$100
()30,109 ms (100%)30,109 ms (100%)
    org.netbeans.modules.masterfs.watcher.windows.WindowsNotifier.waitForChange
()30,109 ms (100%)30,109 ms (100%)
      
org.netbeans.modules.masterfs.watcher.windows.$Proxy4.GetQueuedCompletionStatus
()30,109 ms (100%)30,109 ms (100%)
        com.sun.jna.Library$Handler.invoke ()30,109 ms (100%)30,109 ms
(100%)
The key difference is that when waiting for the Open Project dialog, CPU
time is also accumulating elsewhere.  e.g. in "Inactive Request Processor
Thread"
Inactive RequestProcessor thread [Was:Explorer
Actions/org.netbeans.modules.openide.explorer.ExplorerActionsImpl$ActionStateUpdater]173,499
ms (100%)36,594 ms (100%)
  org.openide.util.RequestProcessor$Processor.run ()190,800 ms (100%)36,594
ms (100%)
    java.lang.Object.wait[native] ()163,209 ms (81.1%)0.0 ms (0%)
      org.openide.util.lookup.Lookups.executeWith ()37,990 ms (23.4%)36,594
ms (100%)
Here is a list of hotspots... note that the top 4 items are just constantly
increasing every second.
All I have done since starting the sampling is show the open Project dialog
and cancel it a few times.
image.png
(Hopefully the screenshot comes through)
Scott
On Fri, Nov 5, 2021 at 4:57 AM Svata Dedic <[email protected]
<mailto:[email protected]>> wrote:
   Hi,
   When it happens again, either run VisualVM in parallel & monitor, or
   take a few thread dumps in sequence (CTRL + \ in console or SIGQUIT
   signal). Maybe the thread dumps could lead us to what blocks project
   open or takes so much time. File a JIRA issue + attach the visualvm
   snapshots or thread dumps. Thanks.
   -S.
   Dne 05. 11. 21 v 4:29 Scott Palmer napsal(a):
    > I've hit this exception a couple times now...  I'm just trying to
   open
    > Gradle projects.  Note that the Open Project... dialog takes a
   very long
    > time to appear, unacceptably long - tens of seconds.
    >
    > java.lang.NullPointerException: Cannot invoke "String.equals(Object)"
    > because "value" is null
    > at
    >
   
org.netbeans.core.startup.preferences.NbPreferences.put(NbPreferences.java:154)
    > at
    >
   
org.netbeans.core.startup.preferences.NbPreferences.put(NbPreferences.java:149)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectListSettings.setStringList(OpenProjectListSettings.java:169)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectListSettings.setOpenProjectsDisplayNames(OpenProjectListSettings.java:219)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList.saveProjectList(OpenProjectList.java:1462)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList.access$2300(OpenProjectList.java:116)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList$10.run(OpenProjectList.java:873)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList$10.run(OpenProjectList.java:870)
    > at
    >
   
org.netbeans.modules.openide.util.DefaultMutexImplementation.writeAccess(DefaultMutexImplementation.java:229)
    > at org.openide.util.Mutex.writeAccess(Mutex.java:252)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList.open(OpenProjectList.java:870)
    > at
    >
   
org.netbeans.modules.project.ui.OpenProjectList$6.run(OpenProjectList.java:672)
    > at
   org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
    > at
    >
   org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
    > at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
    > [catch] at
    >
   org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
    >
   ---------------------------------------------------------------------
   To unsubscribe, e-mail: [email protected]
   <mailto:[email protected]>
   For additional commands, e-mail: [email protected]
   <mailto:[email protected]>
   For further information about the NetBeans mailing lists, visit:
   https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
---------------------------------------------------------------------
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

Reply via email to