Git Product home page Git Product logo

Comments (4)

mabasic avatar mabasic commented on July 22, 2024 2

Hi,

currently there are no optimizations. I will have to find time to test the performance and check the queries when there are a lot of comment involved. What I usually do is eager load the comment with with('comments'), but I think that the issue you are saying is with a lot of child comment.

from comments.

mabasic avatar mabasic commented on July 22, 2024 2

Holy shit! I have managed to solve this. Commit coming soon...

from comments.

guoxiangke avatar guoxiangke commented on July 22, 2024

image
I add lines 7-8 to advoid some N+1 query.
But still has one:
image

Each comment need query the user table once.

from comments.

mabasic avatar mabasic commented on July 22, 2024

I have just spent two hours trying to eager load deeply nested relationships called for children of children of children...

This does not work.

I have read the entire readme for this package lazychaser/laravel-nestedset and I still don't understand what is it for and how to use it.

The only solution that I currently see is to not allow replies or to handle replies differently.

from comments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.