-
Notifications
You must be signed in to change notification settings - Fork 92
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
Optimization task 4 #149
base: master
Are you sure you want to change the base?
Optimization task 4 #149
Conversation
Честно сказать, в этом задании хотелось бы побольше времени поработать, найти больше точек оптимизации через APM и rack-mini-profiler. Возможно, позже еще доработаю. |
bd23a8e
to
bf2153c
Compare
bf2153c
to
c0ba589
Compare
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.
✅ 💪 всё чётко, спасибо за работу!
@@ -55,7 +55,9 @@ | |||
<% if !user_signed_in? && i == 4 %> | |||
<%= render "stories/sign_in_invitation" %> | |||
<% end %> | |||
<%= render "articles/single_story", story: story %> | |||
<% cache ["v1", story, story.updated_at, story.comments_count, story.positive_reactions_count] do %> |
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.
👍
Time per request: 149.877 [ms] (mean, across all concurrent requests) | ||
Transfer rate: 857.59 [Kbytes/sec] received | ||
``` | ||
- Время обработки всех запросов сократилось в 4 раза с 60 до 15 секунд. Также количество Failed сократилось с 99 до 0. |
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.
99 failed - там response size чуть не сходится; видимо есть какие-то отличия от исходного ответа, который берётся за эталон; а при local_production всё стабильно в этом плане
|
||
### 2. Отсутствие кеширования partial-ов _single_story.html.erb | ||
- Readme задания и rack-mini-profiler | ||
- Добавил кеширование partial'а, учел, что в него входят счётчики лайков и комментариев. |
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.
👍
Time per request: 71.791 [ms] (mean, across all concurrent requests) | ||
Transfer rate: 1772.19 [Kbytes/sec] received | ||
``` | ||
- Время обработки всех запросов сократилось в два раза с 14 до 7 секунд. |
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.
👍
No description provided.