Alain Pilon
Joined
420 Experience
4 Lessons Completed
0 Questions Solved
Activity
I will be in a similar situation and my solution will either be to cache the mention or store it in redis using the sgid and set it to auto expire in a few hours. Avatar may be out of date for a short duration because of the cache but it is a small price to pay to reduce load on the DB.
I use your approach, but if the comment has no parents, I simply delete the record. No reasons to keep it poluting the UI