-
Notifications
You must be signed in to change notification settings - Fork 115
[Yaroslavzev] #107
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
base: master
Are you sure you want to change the base?
[Yaroslavzev] #107
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! ✅
@@ -1 +1 @@ | |||
2.6.3 | |||
3.2.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
<% end %> | ||
</ul> | ||
<%= render "delimiter" %> | ||
==================================================== |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for your information, есть в рендеринге коллекций возможность задать разделитель параметром: https://guides.rubyonrails.org/layouts_and_rendering.html#spacer-templates
И в целом с использованием render collection производительность не такая ужасная как было тут с рендерингом циклом
* Вторым шагом было добавлние загрузки связанных объектов Services с помощью `includes` для Trip и Bus. Время загрузки уменьшилось до 548ms | ||
- Логи показали много обращений к шаблон для рендера | ||
* Создание общего шаблона для рендера без вложенных шаблонов уменьшило время загрузки страницы `автобусы/Самара/Москва` до 178ms | ||
- Добавление индексов согласно рекомендациям PG Hero сократило время загрузки до 156ms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
именно на скорость рендера страницы особо не влияет тут, так как это не главная точка роста, но если бы мы заходили с точки зрения снижения нагрузки на БД, то такой индекс бы супер помог
PR содержит оптимизированную версию Rails приложения, в которой:
rake reload_json[fixtures/large.json]
должнен выполняться в пределах минуты;автобусы/Самара/Москва
должна укалывать в 200 мс;