We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signing in an environment with a lot of identities is very slow. Basically because
async getIdentity(did: string): Promise<AbstractIdentity> { const identities = await this.getIdentities() const identity = identities.find(item => item.did === did) if (identity) { return identity } else { return Promise.reject('No identity: ' + did) } }
gets all the identities first and then select one.
Maybe is easier something like:
async getIdentity(did: string): Promise<AbstractIdentity> { let identity: AbstractIdentity; for (const identityProvider of this.identityProviders) { const providerIdentity = await identityProvider.getIdentity(did); if(providerIdentity) identity = providerIdentity; } if (identity) { return identity } else { return Promise.reject('No identity: ' + did) } }
is much faster, and scales better, since the providers number is constant.
The text was updated successfully, but these errors were encountered:
feat(core): Fix issue decentralized-identity#229
e091c93
b2f6332
No branches or pull requests
Signing in an environment with a lot of identities is very slow. Basically because
gets all the identities first and then select one.
Maybe is easier something like:
is much faster, and scales better, since the providers number is constant.
The text was updated successfully, but these errors were encountered: