Skip to content
New issue

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

Improve Client Creation Performance #1352

Open
nplasterer opened this issue Dec 1, 2024 · 1 comment
Open

Improve Client Creation Performance #1352

nplasterer opened this issue Dec 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nplasterer
Copy link
Contributor

The create method takes both an address and an inboxId. When creating a client for the first time, an apiClient is initialized to call getOrCreateInboxId, and another is created during create. This double initialization contributes to the performance issue.
My initial thought was that create should only take an address, and we should handle fetching or creating the inboxId internally. However, we’re constrained by the need to pass the database path to create, and the database path is based on the inboxId. This means the inboxId must be known before calling create.

Lets think about how we might be able to improve this long term.

@nplasterer nplasterer added the enhancement New feature or request label Dec 1, 2024
@nplasterer
Copy link
Contributor Author

Okay I'm going deep on the performance and I'm find 2 areas in particular that are really bad

  • registerIdentity(signatureRequest) -1.561s this took nearly all the time for creating a new client
  • getInboxIdForAddress() - 0.524s this is a huge hit when you're just trying to find the existing client from the database.

@nplasterer nplasterer moved this to In Progress in V3 Backlog Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

No branches or pull requests

2 participants