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

Optimisation - project detail api call can be optimized by avoiding attachment detail. #57

Open
sachin-maheshwari opened this issue Jul 17, 2018 · 2 comments

Comments

@sachin-maheshwari
Copy link
Contributor

Current call is fetching 'attachment' details along with project detail. For 'attachment' detail, there is another back-end API (ap-file service) call, which can be avoided as we are not using 'attachment' detail anywhere in notification, we are using only associated members with project to send notifications.
https://github.com/topcoder-platform/tc-notifications/blob/dev/connect/service.js#L21

@sachin-maheshwari
Copy link
Contributor Author

@vikasrohit can you please verify whatever I mentioned in description is doable ?

@vikasrohit
Copy link

@sachin-maheshwari I think we need the attachment details now as we are sending attachment's Url in bus events. Further, to call ap-file-service, we still need attachment id which is retrieved only by fetching the attachment details.
And lastly we support avoiding an extra db call to attachments by not passing attachments in the fields param while retrieving project details. We do not fetch attachments when listing the projects but do fetch it when showing project details. :)
However, thanks for the suggestion. I found one issue though.

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

No branches or pull requests

2 participants