I'm worried about the performance of this function over larger sets of comments. Speaking with @hakubo, I understand that this general approach with reparsing the comments is unavoidable because of the way comments were initially implemented, but maybe there is a way we can mitigate any performance issues.

I'd suggest limit processing to batches of 25 at a time, and paginating the data since we'll never really need to show all comments at once.