Skip to content

Conversation

@Yorickov
Copy link

No description provided.

</h1>
<h2>
<%= "В расписании #{@trips.count} рейсов" %>
<%= "В расписании #{@trips.load.size} рейсов" %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

👍 👍 , явно и сразу понятно что происходит, загрузили в массив, взяли размер

<% end %>
</ul>
<%= render "delimiter" %>
====================================================
Copy link
Collaborator

Choose a reason for hiding this comment

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

Можно ещё с рендерингом коллекций и даже указать шаблон для разделителя https://guides.rubyonrails.org/layouts_and_rendering.html#spacer-templates

large.json - 8.34s
Разница драматическая, на этом эту часть заканчиваем

Поставил pg_hero - eму все нравится, полезной инфы - нет
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.

💪

*Какими ещё результами можете поделиться*
- Bullet ожидаемо утомителен
- RMP ожидаемо хорош
- паршиалы - красиво и архитектурно, но ни дороговато ли они стоят подчас? Это главный вывод для меня сегодня.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Можно оставить себе удобство паршлов если рендерить коллекцией https://guides.rubyonrails.org/layouts_and_rendering.html#rendering-collections

там не такая критичная просадка по производительности по сравнению с циклом

}
end

Trip.import!(trips)
Copy link
Collaborator

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