Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N + 1 with replies when viewing a thread. #199

Open
Mo7sin opened this issue Feb 20, 2018 · 2 comments
Open

N + 1 with replies when viewing a thread. #199

Mo7sin opened this issue Feb 20, 2018 · 2 comments

Comments

@Mo7sin
Copy link

Mo7sin commented Feb 20, 2018

Replies cause a big amount of (N + 1) issue.

69 statements were executed, 62 of which were duplicated, 7 unique

alt text


I think it's related to $reply->path() method.

@Joucke
Copy link
Contributor

Joucke commented Mar 10, 2018

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?

@Mo7sin
Copy link
Author

Mo7sin commented Mar 12, 2018

Hi @Joucke, I did create a new issue for Reply path() #221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants