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

Optimize Reputation Fetching for Display Purposes #2809

Merged
merged 3 commits into from
Oct 20, 2021

Conversation

rdig
Copy link
Member

@rdig rdig commented Oct 19, 2021

This PR optimizes the way we fetch user reputation for display purposes, by getting just the values, omitting the proofs.

This is done by calling the getReputationWithoutProofs common extension available from this version of colonyJS onward on the `colonyClient.

The problem with fetching eveything, including proofs is that behind the scenes, every call also replays back all the full reputation state. Multiply this by a large number of requests and we up hammering the reputation oracle pretty hard.

Note: that for places where we still need the proofs for the user's reputation (eg: all sagas) we still use the "heavy" version of this call: getReputation

The bulk of the changes that enabled making this change were actually on the colonyJS side: JoinColony/colonyJS@2d6c84d...ab5065b

Changes

  • Updated colonyNetwork submodule to latest develop branch changes -- this brought in the new reputation oracle endpoint
  • Updated colonyJS to latest beta release -- this brought in the new getReputationWithoutProofs colony client common extension
  • Refactored colony, user, motions client resolver to fetch reputation without proofs

Resolves #2781

@rdig rdig requested a review from a team October 19, 2021 22:28
@rdig rdig self-assigned this Oct 19, 2021
Copy link
Contributor

@chinins chinins left a comment

Choose a reason for hiding this comment

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

All good!

@rdig rdig merged commit 4b2967d into master Oct 20, 2021
@rdig rdig deleted the feature/2781-optimized-user-reputation-fetcthing branch October 20, 2021 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize User Reputation Fetching
2 participants