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

Don't need to re-fetch cToken ID's on every account fetch in user table #8

Open
haydenshively opened this issue Jul 29, 2020 · 0 comments
Labels
performance Changes that result in more speed or efficiency

Comments

@haydenshively
Copy link
Owner

haydenshively commented Jul 29, 2020

IDs in the CTOKEN table should be constant. The only time they change is if an asset is added/removed from Compound, in which case we could just restart the code. This means that the user table code can just store a map of cTokenAddresses -> cTokenIDs and reuse it when populating the user table with accounts. This should cut down on CPU usage since there are thousands of accounts, and we'd be using one less database call for each one.

@haydenshively haydenshively added the performance Changes that result in more speed or efficiency label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Changes that result in more speed or efficiency
Projects
None yet
Development

No branches or pull requests

1 participant