Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

perf(layout): avoid allocating memory when using split ergonomic utils #1105

Merged
merged 1 commit into from
May 13, 2024

Conversation

tranzystorekk
Copy link
Contributor

Noticed we create an intermediate vec in Layout::areas and Layout::spacers but there's no need for one.

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 94.2%. Comparing base (eb281df) to head (2fa664a).

Files Patch % Lines
src/layout/layout.rs 50.0% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1105   +/-   ##
=====================================
  Coverage   94.2%   94.2%           
=====================================
  Files         61      61           
  Lines      14587   14587           
=====================================
  Hits       13751   13751           
  Misses       836     836           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@EdJoPaTo EdJoPaTo left a comment

Choose a reason for hiding this comment

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

I like seeing improvements approaches like this!

@joshka joshka merged commit 1a4bb1c into ratatui:main May 13, 2024
32 of 33 checks passed
@tranzystorekk tranzystorekk deleted the areas-no-vec branch May 13, 2024 23:56
joshka pushed a commit to nowNick/ratatui that referenced this pull request May 24, 2024
ratatui#1105)

Don't create intermediate vec in `Layout::areas` and
`Layout::spacers` when there's no need for one.
joshka pushed a commit to erak/ratatui that referenced this pull request Oct 14, 2024
ratatui#1105)

Don't create intermediate vec in `Layout::areas` and
`Layout::spacers` when there's no need for one.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants