Skip to content

optimization 2#5

Open
yarafan wants to merge 1 commit intospajic:masterfrom
yarafan:master
Open

optimization 2#5
yarafan wants to merge 1 commit intospajic:masterfrom
yarafan:master

Conversation

@yarafan
Copy link

@yarafan yarafan commented Mar 17, 2019

No description provided.

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.

Аппрув + пара лайков

5.64 3.431 0.685 0.000 2.746 16214 Object#aggregate_user_stats
```
### Находка №1
Проанализировав исходные данные выяснилось, что даты изначально приходят в нужном формате, поэтому нет нужды создавать Date объект
Copy link
Owner

Choose a reason for hiding this comment

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

👍

Однако нерешенной остается проблема резкого выделения [памяти](https://imgur.com/cvkmvMS) связанная с формирование json строки

### Находка №3
Вместо библиотеки, которая целиком парсит hash в json, можно использовать yajl, которая позволяет "стримить" json в файл
Copy link
Owner

Choose a reason for hiding this comment

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

👍 плюсик за стриминг!

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