Skip to content

Conversation

@one0fnine
Copy link

  • memory
    allocated memory by class

326_126_88 String
204_421_52 MatchData
161_736_32 Hash
768_498_4 Array
162_813_6 Date
163_120 User
Total allocated: 787_261_33 bytes (857028 objects)

  • cpu
    100.00% 0.00% 857034.00 7.00 0.00 857027.00 1 Object#work
  • time
    1mb: Finish in 0.6
    ~128Mb: Finish in ~110.46

@one0fnine one0fnine changed the title optmize parsing of browsers log task-1 Mar 7, 2019
Copy link
Owner

@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.

Аппрув + несколько комментов


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

### Ваша находка №1
Copy link
Owner

Choose a reason for hiding this comment

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

Ваша находка №1 -> Находка №1 ?

и конкатенацию строк (String#split)

### Ваша находка №3
Долго происходил процесс обработки сессий для каждого пользователя
Copy link
Owner

Choose a reason for hiding this comment

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

Хорошо было бы добавить к каждому шагу больше конкретики.

  • Долго - это сколько?
  • Что было основной причиной?
  • Как нашли причину?
  • Как устранили?
  • Как изменилась метрика?

ie_counter = 0
chrome_counter = 0
users_browsers.each do |b|
ie_counter += 1 if ie_counter == 0 && /INTERNET EXPLORER/.match?(b)
Copy link
Owner

Choose a reason for hiding this comment

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

А зачем проверка if ie_counter == 0?

Copy link
Author

Choose a reason for hiding this comment

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

я думал, что так можно сократить лишнюю проверку #match?

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.

2 participants