Тёмный

N+1 Query And Performance Optimizations | Ruby On Rails For Beginners Part 9 

Deanin
Подписаться 18 тыс.
Просмотров 5 тыс.
50% 1

Learn what N+1 queries are, and how to fix them with this guide on the Bullet gem. Afterwards, learn how to do batch transactions with the ActiveRecord-Import gem, and how to do some basic Benchmarks in Rails 7.
Links:
/ optimizing-your-rails-app
github.com/flyerhzm/bullet
apidock.com/rails/ActiveRecor...
github.com/zdennis/activereco...
Source: github.com/Deanout/blog_appli...
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
linktr.ee/deanin
Join this channel to get access to perks:
/ @deanin
If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
Timestamps
0:00 Performance Optimizations In Rails 7
1:14 Fix N+1 Queries With The Bullet Gem
6:18 Solve Repeated Database Hits With A Counter Cache
9:45 Benchmark Performance With Rails Benchmark.measure
15:54 Improve Looped Insert Performance With ActiveRecord-Import Transactions
#Deanin #Software #Programming

Опубликовано:

 

30 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 16   
@Deanin
@Deanin 2 года назад
Thought I'd try something different with this video, I hope you like my Performance
@Deanin
@Deanin 2 года назад
Did I do an entire video just to make one pun? Maybe.
@bergenbergenbergenbergen3512
@bergenbergenbergenbergen3512 2 года назад
Easily one of the top webdev and especially RoR channels on the internet 👍
@ricardomordaunt1101
@ricardomordaunt1101 2 года назад
Thank you very much for taking the time out to post these very helpful videos..
@ledockol
@ledockol 2 года назад
Very helpful video, thanks!
@marcusl16
@marcusl16 2 года назад
God, i waited so much to see how you could face this super common problem but in rails7, thank you so much for all this knowledge.
@Deanin
@Deanin 2 года назад
Glad it was helpful 🙂
@tkhobbes
@tkhobbes 2 года назад
What a fantastic video! Rarely found neither on blogs or in other youtube videos! Really helpful!
@kooba1854
@kooba1854 2 года назад
Wow, that's very helpful thanks a lot! 🚀
@danielleedottech
@danielleedottech 2 года назад
this is some high quality content!
@Deanin
@Deanin 2 года назад
Appreciate the kind words haha!
@ratnarajsukale141
@ratnarajsukale141 2 года назад
Rails 6 added insert_all, insert_all! and upsert_all methods do we still need import gem?
@ReaPer4463
@ReaPer4463 2 года назад
Bazaru net
@ericchua3492
@ericchua3492 Год назад
At 9:43, you asked us to do our own show post fixes. I can't figure out how to fix it, checked your repo. Any right repo I can refer?
@guillermoemmanuelsanchezin1664
IDK if you are still wondering how to solve this. I noticed that if you open your terminal, there's a part in which indicates the possible path in which you need to make the modifications. In my case, indicated me that it was admin/show_post. I divided my @post from show_post to two variables as follow: @post = Post.includes(:user).find(params[:id]) @comments = Post.find(params[:id]).comments.includes(%i[user rich_text_body]) After those changes in my admin_controller, I needed to change one line in the views: from: to: It was mostly try and error tbh
@dangmannn
@dangmannn Год назад
In the admin controller: def show_post @post = Post.includes(:user, comments: [:user, :rich_text_body]).find(params[:id]) end
Далее
Shopping Cart Order Sessions In Rails 7 With Turbo
26:21
Я КУПИЛ САМЫЙ МОЩНЫЙ МОТОЦИКЛ!
59:15
Викторина от МАМЫ 🆘 | WICSUR #shorts
00:58
The Ruby On Rails Junior Developer Problem
16:03
Просмотров 19 тыс.
Intro To View Components In Ruby On Rails 7
35:27
Просмотров 8 тыс.
Rails Performance Tips and Tricks
38:46
Просмотров 2,3 тыс.
Is Ruby On Rails Too Slow!? 😱
11:35
Просмотров 10 тыс.
Ruby on Rails: The Documentary
44:16
Просмотров 246 тыс.
N+1 Query problem and it's solution
9:38
Просмотров 5 тыс.