Refactor the fetching of comments in the API to always retrieve the attachments
grafana-dee opened this issue · 0 comments
grafana-dee commented
Currently, when fetching a page of comments, i.e. within a conversation... the attachments have to be fetched per comments.
This means for a page of 25 comments there are potentially up to 25 additional API calls occurring, one per comment, to retrieve the attachments.
This does not seem ideal given that in nearly all cases fetching the comment requires fetching the attachments... and in the occasions where it does not these are the least frequently called paths. i.e. Reads of conversation pages happen 10,000x more than an edit of a comment... yet we're doing more work by fetching attachments per comment on the read path as it involves distinct API calls.