[Bug] Checking clipboard state on startup can delay overall launch time #1137
Open
Description
Is there an existing issue for this?
- I have searched the existing issues (including the closed ones)
Description
Checking clipboard state on startup can delay overall launch time.
See ClipboardNotifier
constructor. When in clipboard there are objects that require java to check if they can be handled, then it may take (relatively) a lot of time.
Steps to reproduce
- In
ClipboardNotifier
constructor uncomment the code block that checks the clipboard - Copy to clipboard something from Idea, like whole class etc
- Attach debuger to muCommander, set breakpoint on the constructor
- run muCommander and observe delay on
isPasteClipboardFilesActionEnabled
method
Expected behavior
Try to implement solution from here: https://stackoverflow.com/questions/39493232/how-to-determine-current-clipboard-dataflavor-before-get-clip-content
Actual behavior
Delay while checking clipboard and a lot of 'class not found' exceptions in logs.
Screenshots?
No response
muCommander version
1.3.0 and in the newer version the code in constructor will be probably commented out
Java version
java 20 (embedded in muC)
Operating System type and version
macOS Ventura
Relevant log output
No response