Redundant load of discussions in issue page
I see that in IssuesController#show
we call:
@discussions = @issue.discussions
@notes = prepare_notes_for_rendering(@discussions.flat_map(&:notes), @noteable)
This is taking 32% of the load time in http://profiler.gitlap.com/20170916/328b0c66-074c-4e47-9df8-50595778d9c1.html.gz:
We also call this in IssuesController#discussions
. Can we get rid of the first load now (and perhaps only reserve this for the JSON format)?
Edited by Stan Hu