-
Notifications
You must be signed in to change notification settings - Fork 89
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
feat(backend): performance and caching poc #2954
base: main
Are you sure you want to change the base?
Conversation
* feat(backend): add create quote service metrics * feat: add getQuote traces
# Conflicts: # localenv/cloud-nine-wallet/dbinit.sql
# Conflicts: # localenv/telemetry/grafana/provisioning/dashboards/example.json # test/performance/scripts/create-outgoing-payments.js
# Conflicts: # test/performance/scripts/create-outgoing-payments.js
…ason' into bc/ww-performance-jason
This reverts commit 7be75f2.
✅ Deploy Preview for brilliant-pasca-3e80ec canceled.
|
const incomingPayment = await IncomingPayment.query(deps.knex).get(options) | ||
await deps.assetService.setOn(incomingPayment) | ||
await deps.walletAddressService.setOn(incomingPayment) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just for documentation's sake (dont necessarily need to do it here), Radu had a good suggestion for how to do this better.
We could override the withGraphFetched
method on the model instead of manually retrieving/setting asset, wallet etc. everywhere. Would take some parsing of the original arguments or maybe some new arg to specify what to get off the cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think doing explicitly is better, overriding withGraphFetched
might be a bit too hidden/"magic". Probably long term solution is just doing something like repository pattern and abstracting over ORM/db access, with an ability to add caching in front as well
Changes proposed in this pull request
Context
Checklist
fixes #number