Skip to content

[Bug] Checking clipboard state on startup can delay overall launch time #1137

Open
@pskowronek

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

  1. In ClipboardNotifier constructor uncomment the code block that checks the clipboard
  2. Copy to clipboard something from Idea, like whole class etc
  3. Attach debuger to muCommander, set breakpoint on the constructor
  4. 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

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions