I’m experiencing long delays when I open a file dialogue for saving or opening a product or any other file. The delay is up to seven seconds between the button click and the opening of the dialogue.
This might be mainly an issue on Windows. I haven’t validated if the delay also exists on other OS. So, I tried to find the cause for it. And after several hours I found it.
The delay is caused by a security manager installed by the NetBeans platform.
If this is disabled, the dialogues are opened instantly.
Now you’re asking, is disabling a security manager a good idea, right?
Good question, I had the same.
First, the usual security measures of the OS are still active. So, you and your data are actually safe. The security manager ist on top of this. It a remainder of the time when Java Applets were executed in the browser. Also, it is deprecated in the recent Java versions (>17). You can read more here Intro to the Java SecurityManager | Baeldung and here The SecurityManager is getting removed in Java: What that means for you | Snyk. NetBeans is also already aware of this and working on a replacement.
NetBeans used it for some special checks, which are not necessary to run the NetBeans Platform. If installation of the TopSecurityManager fails only a warning is logged. The application is still executed.
I think it is pretty safe to disable it. But still, you are doing it on your own risk.
Maybe someone else wants to further investigate the risk. For me it is okay to deactivate the security manager.
Solution:
Add this to the default_options in the snap.conf
file in the etc
folder of the installation directory.
-J-DTopSecurityManager.disable=true
Now SNAP is snappy again
@TomBlock @diana_harosa Can this be used as default setting for future SNAP releases?
Marco from EOMasters - Mastering Earth Observation -