Profiling for N+1 Queries - Build Expense Tracker App With PHP 8
Вставка
- Опубліковано 2 жов 2024
- In this video we learn about eager loading & how to fix n+1 problems. We use a tool called Clockwork to do the profiling.
SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon: / programwithgio
THANK YOU!
🛠️ TOOLS & SERVICES I USE
Digital Ocean Hosting - Get 100$ credit - m.do.co/c/38b9...
Domains on Namecheap - namecheap.pxf....
Envato Elements - 1.envato.marke...
LESSON P.23
Starting Source Code - github.com/gge...
Ending Source Code - github.com/gge...
Course Outline - github.com/gge...
Course Playlist - • Learn PHP The Right Wa...
Clockwork - underground.wo...
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
Please launch laravel course.....
I will start working on it once we finish the PHP series. Can't do it at the moment because I don't have a lot of free time unfortunately
@Muhammad Alsoofi about 10
Eager loading saves the day.
For sure
Hi Gio. How do know what basically do clockwork's ->setStorage(), ->addDataSource() methods and what parameters it may potentially accept? I could not find those details in documentation and I am wondering how can we know such things?
hey, I'm not sure to be honest. You could inspect the source code and see
Oh wow. This is great stuff Gio. Thank you so much!
🙌🙌
thank you so much, your work is freaking awesome
You're welcome, thank you
I 2nd that
nice
🙌
Hi Gio,
Is this tool better than Laravel Debuggbar in terms of profiling for N+1?
Laravel Debugbar is for Laravel, Clockwork can be used in other frameworks as well. Debugbar is great for finding how many models are hydrated, also can find out n+1 problems, etc. I do prefer clockwork though & when I work in Laravel I also have telescope always installed
@@ProgramWithGio Thanks... Apart from Laravel and Slim, what are your preferred php framework? I understand Laravel is very popular but in which scenario you would NOT choose Laravel in your project?
Hi Gio, this is new stuff. Being able to look into performance is amazing Gio. I see lazy loading functions too, I guess those also have advantages in its own way to help performance when working with large data. These adjustments really require careful thought. Thanks for this lesson Gio.
🙌🙌
Can you please make a video about this with vanilla php for has-many and many-to-many relationships? I'm not sure how to do it without a orm
We would essentially be building an ORM from scratch then if we start hydrating objects and implementing relationships between them.
Wow
🙌
Does this course replace buying a PHP course on Udemy?
I would hope so
Yes of course,
I did watch a course about php in Udemy (about 30 to 40 hours), and I can say that this course is even better then the courses on Udemy
Why do you use Brave bowser?
Built in ad blocker & works better for me
@@ProgramWithGio is it developer friendly?
@@free2idol1 its chromium based so if you like chrome you will like brave as well.