plugins-workspace: Stronghold.load() is slow
In my JS code, I run the following code:
appDataDir()
.then(async dir => {
console.log(dir)
const vaultPath = `${dir}/vault.hold`;
const vaultPassword = 'vault_password';
const stronghold = await Stronghold.load(vaultPath, vaultPassword);
console.log("TEST");
})
The time between the first and second log is always somewhere between 1 and 2 minutes. Is there a reason why Stronghold.load() is so slow for me?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 7
- Comments: 19 (2 by maintainers)
Commits related to this issue
- feat: add stronghold integration Stronghold loading is too slow for now, waiting for a fix https://github.com/tauri-apps/plugins-workspace/issues/2048 — committed to kunkunsh/kunkun by HuakunShen 2 years ago
- feat: integrate keyring and stronghold plugin (#39) * feat: add keyring plugin to handle DB encryption * feat: integrate stronghold plugin * feat: use new get_or_set APIs added to keyring plugi... — committed to kunkunsh/kunkun by HuakunShen 2 years ago
Running in release mode does make things a bit more inconvenient.
Just as a workaround, I created a simple class with getKey, setKey and removeKey methods. Using env variables to check if I’m in
DEVorPRODif in DEV I use localStorage just to quickly test without having to wait, and only in PROD will be using stronghold.Issue seems to be with the
scryptcrate, which is a dependency ofiota-crypto. Try adding this toCargo.toml@gabriel-le Yes, it’s the same here.