Skip to content

[solana-wallet-snap] Performance improvements #111

Description

@gantunesr

1 - The loop inside createAccounts can be parallelized using Promise.all

await Promise.all(indicesToCreate.map(async (groupIndex) => { ... });

2 - Instead of#listAccounts() it could use an "index cache" and avoid deserializing the entire keyringAccounts blob

const keyringAccounts =
  (await this.#state.getKey<UnencryptedStateValue['keyringAccounts']>(
    'keyringAccounts',
  )) ?? {};

for (const account of Object.values(keyringAccounts)) { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions