council
council copied to clipboard
N + 1 with replies when viewing a thread.
Replies cause a big amount of (N + 1) issue.
69 statements were executed, 62 of which were duplicated, 7 unique
I think it's related to $reply->path()
method.
Hi @Mo7sin, I think these are 2 separate issues.
The N+1 issue is caused by
- appending the path to Reply, without
- eager loading the thread.
I'm working on a fix for that.
Also path() method needs to be modified to generate the correct URL for paginated replies
Maybe like that:
http://council.local/threads/eius/non-quasi-est-atque-maiores-et-ut-1?page=2#reply-21
As eager loading the Thread won't fix this, could you move that to a separate Issue?
Hi @Joucke, I did create a new issue for Reply path() #221