Skip to content

Calling Get-SecretVault, Register-SecretVault or Unlock-SecretVault first time in a new PowerShell session takes longer. #73

@c3rberus

Description

@c3rberus

I have been trying to troubleshoot why my script is taking longer to run and have narrowed it down to using the SecretManagement.KeePass module.

I've noticed that on first call to register, unlock and retrieve secrets takes 5+ seconds.

Within the same PowerShell session, if I unregister and re-register/unlock the vault, it executes under a second.

Not sure how to troubleshoot this further, but I was able to narrow down my script to these calls. I suspect there is something happening in the background on the first call (loading of dlls?).

Using PowerShell 7.2.1 (tried 5.1 as well) and SecretManagement.KeePass 0.9.2 on Windows 2022.

Anyone else run into this, is there a way to reduce the initial time it takes to call these commands?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions