Skip to content

Conversation

@davinciRor
Copy link

No description provided.

Copy link
Collaborator

@spajic spajic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Оставил несколько комментов к коду.
В целом тут есть ещё над чем поработать, чтобы уложиться в бюджет.
Попробуйте разные профилировщики, более точно разобраться куда уходит время за счёт разбиения жирных методов на подметоды.

case-study.md Outdated
@@ -0,0 +1,15 @@
1. выключил ГК поставил руби проф
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Case-study хотелось бы более подробно и ближе к шаблону.
Самое главное - хотелось бы по шагам видеть главную точку роста в профилировщике, как она была исправлена и какой был эффект.

case-study.md Outdated
@@ -0,0 +1,15 @@
1. выключил ГК поставил руби проф
2. Date#parse 22.09 -> Date.strptime
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Подсказка, надо подумать, зачем вообще делается парсинг даты.

task-1.rb Outdated
totalTime: user.sessions.map { |s| s[:time].to_i }.sum.to_s + ' min.',
longestSession: user.sessions.map { |s| s[:time].to_i }.max.to_s + ' min.',
browsers: user.sessions.map { |s| s[:browser] }.sort.join(', '),
usedIE: user.sessions.any? { |s| s[:browser] =~ /INTERNET EXPLORER/ },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Регэкспы медленные

Copy link
Collaborator

@spajic spajic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve + some comments



## Формирование метрики
Для того, чтобы понимать, дают ли мои изменения положительный эффект на быстродействие программы я придумал использовать такую метрику: Wall Time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wall Time чего?

Программа поставлялась с тестом. Выполнение этого теста в фидбек-лупе позволяет не допустить изменения логики программы при оптимизации.

## Feedback-Loop
Для того, чтобы иметь возможность быстро проверять гипотезы я выстроил эффективный `feedback-loop`, который позволил мне получать обратную связь по эффективности сделанных изменений за 1s-2s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1-2 секунды - то что надо 👍


Вот какие проблемы удалось найти и решить

- Многочисленое использование бесполезных map
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А это была главная точка роста?
Каким отчётом нашли?
Как поменяли и какой был эффект?
Хотелось бы видеть эту информацию в case-study.

RSpec.describe "File Parsing" do
context "check performance" do
it "should take us less than 30 seconds" do
expect { work("data_large.txt", disable_gc: true) }.to perform_under(30).sec
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@vkurennov vkurennov closed this Jan 24, 2020
axelx pushed a commit to axelx/rails-optimization-task1 that referenced this pull request Sep 28, 2020
smaximov added a commit to smaximov/rails-optimization-task1 that referenced this pull request Oct 4, 2020
smaximov added a commit to smaximov/rails-optimization-task1 that referenced this pull request Oct 4, 2020
kevin-glare pushed a commit to kevin-glare/rails-optimization-task1 that referenced this pull request Apr 22, 2021
stashevgenij added a commit to stashevgenij/rails-optimization-task1 that referenced this pull request Jun 23, 2022
hayah referenced this pull request in hayah/rails-optimization-task1 Mar 5, 2023
araslanov-e added a commit to araslanov-e/rails-optimization-task1 that referenced this pull request Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants