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

perf: optimize api request #846

Merged
merged 4 commits into from
Sep 19, 2024
Merged

perf: optimize api request #846

merged 4 commits into from
Sep 19, 2024

Conversation

theborakompanioni
Copy link
Collaborator

@theborakompanioni theborakompanioni commented Sep 12, 2024

This PR attempts to prevent fetching UTXO labels when it is not strictly necessary.
The request to /display is quite expensive for heavily used wallets and users report it can take up to several minutes!

On initially unlocking a wallet the request is made at least once. After that, it will only be done when there is no label present for a UTXO returned in the /utxo endpoint response.

How to test?

Do some transactions and verify that the new UTXOs all have the correct label attached. e.g. deposit, cj-out, etc.
/display requests previously always executed in the Jar Details Modal and the Send page.

@theborakompanioni theborakompanioni added the performance Performance and/or speed improvements label Sep 12, 2024
@theborakompanioni theborakompanioni self-assigned this Sep 12, 2024
@theborakompanioni theborakompanioni marked this pull request as ready for review September 17, 2024 10:42
@theborakompanioni
Copy link
Collaborator Author

ping @editwentyone

Copy link

@editwentyone editwentyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, works so far!

@theborakompanioni theborakompanioni merged commit 2c33a88 into devel Sep 19, 2024
1 check passed
@theborakompanioni theborakompanioni deleted the perf/optimize-fetch branch September 19, 2024 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance and/or speed improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants