Considering this one screen, you have many queries based on the same data, fetch once, filter later. I wouldn't worry about traffic crashing your app, that's what cache is for and will help with continues DB calls.
What do you mean 80 views rendered? You load 80, separate views/compositions for a single page?
I meant I have on feed with 10 posts on it, each posts can have up to 5 comments. so each post is a view, each comment is a view. so only this small this is 60 views....
It should be fine as long as you don't make another sql query for each "view".
Belar said:
fetch once, filter later.
Fetch the data once, then filter it. Then loop through the filtered data.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community