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

[SERVICES-2592] Portfolio queries cache improvements #1479

Merged

Conversation

mad2sm0key
Copy link
Contributor

@mad2sm0key mad2sm0key commented Sep 17, 2024

Reasoning

  • userTokens and userNfts queries perform a lot of single GET requests to Redis

Proposed Changes

  • identify Promise.all() calls that perform Redis requests and replace them with batch get requests
    • add bulk getter method for farm token IDs
    • small refactor on Pair dataloaders
    • bulk getter for price discovery : redeem token IDs
    • bulk getters for simple lock : lock token ids, lp token ids, farm proxy token ids
    • bulk getter for staking proxy : dual yield token IDs
    • bulk getter for staking abi : farm token IDs
  • compute user fungible tokens USD value using bulk methods

How to test

  • N/A

- refactor pair dataloaders to use bulk getter methods
- bulk getter for price discovery : redeem token IDs
- bulk getters for simple lock : lock token ids, lp token ids, farm proxy token ids
- bulk getter for staking proxy : dual yield token IDs
- bulk getter for staking abi : farm token IDs
@mad2sm0key mad2sm0key marked this pull request as ready for review September 18, 2024 06:05
cfaur09
cfaur09 previously approved these changes Sep 19, 2024
claudiulataretu
claudiulataretu previously approved these changes Nov 5, 2024
@mad2sm0key mad2sm0key dismissed stale reviews from claudiulataretu and cfaur09 via 0149378 November 5, 2024 14:40
@mad2sm0key mad2sm0key merged commit cefd568 into development Nov 6, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants