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-2569] Caching improvements for pairs #1458

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

mad2sm0key
Copy link
Contributor

@mad2sm0key mad2sm0key commented Sep 10, 2024

Reasoning

  • the pairs and filteredPairs queries rely on Promise.all() for getting field data needed for sorting and filtering. Although most data is coming from cache, this still causes degradation in performance due to the large number of pairs

Proposed Changes

  • add pairs bulk getter methods for the following fields : lpTokenID, state, feeState, lockedValueUSD, deployedAt, tradesCount, hasFarms, hasDualFarms
  • refactor pair dataloaders to use bulk getter methods
  • refactor pairs filtering and sorting to use bulk getters

How to test

  • N/A

@mad2sm0key mad2sm0key changed the title [SERVICES-2569] Caching improvements [SERVICES-2569] Caching improvements for pairs Sep 10, 2024
@mad2sm0key mad2sm0key marked this pull request as ready for review September 10, 2024 15:46
@claudiulataretu claudiulataretu merged commit 034a8b2 into feat/xexchange-v3 Sep 11, 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.

4 participants