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

Performance improvements to /profile lambda #243

Closed
nchamo opened this issue Dec 18, 2020 · 0 comments · Fixed by #245
Closed

Performance improvements to /profile lambda #243

nchamo opened this issue Dec 18, 2020 · 0 comments · Fixed by #245
Assignees
Labels
enhancement New feature or request

Comments

@nchamo
Copy link
Contributor

nchamo commented Dec 18, 2020

Right now, our /profile lambda takes an ethAddress, fetches the profile from the content server, and sanitizes its name by querying the-graph. This last action is performed to verify whether the current name is actually an NFT or not.

Now, the problem is that it can take a few seconds to return the profile. In order to improve this, we can do 2 things:

  1. We can add a cache similar to Cache<EthAddress, Set<Name>>, to avoid querying the-graph each time a profile is requested. This is specially useful since we consider the fact that when a user enters the world, most users around it will fetch the new user's profile from the catalyst at around the same time.
    Notes:
  • This cache should have some kind of time invalidation.
  • We had something similar in the content server that could help in this scenario.
  1. We could add support to fetch more than one profile at a time. This would allow the explorer to avoid many requests, and at the same time we could group name queries to the-graph into one
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
None yet
Development

Successfully merging a pull request may close this issue.

2 participants