Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

perf(bench): Used iter_batched to clone widgets in setup function #383

Merged
merged 1 commit into from
Aug 11, 2023

Conversation

Valentin271
Copy link
Member

Replaced Bencher::iter by Bencher::iter_batched to clone the widget in the setup function instead of in the benchmark timing.

See this PR for more information about iter_batched and its use.

See #262 for the original paragraph implementation.
See #368 for the original block implementation.


New benches reports

Block didn't really move, times were so low in the first place.
Paragraph saw increases of ~20% for 2048 lines and ~65% for 65000 lines. (new is still very high but its only copying memory, not much we can do ..., maybe we should remove it too?)

Block
image

Paragraph
image


PS : Not sure about the conventional commit type, feel free to edit

Replaced `Bencher::iter` by `Bencher::iter_batched` to clone the widget in the setup function instead of in the benchmark timing.
@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Merging #383 (013d510) into main (e18393d) will increase coverage by 0.02%.
Report is 4 commits behind head on main.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #383      +/-   ##
==========================================
+ Coverage   84.99%   85.02%   +0.02%     
==========================================
  Files          40       40              
  Lines        8686     8683       -3     
==========================================
  Hits         7383     7383              
+ Misses       1303     1300       -3     

see 2 files with indirect coverage changes

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

@joshka joshka added this pull request to the merge queue Aug 11, 2023
Merged via the queue into ratatui-org:main with commit 149d489 Aug 11, 2023
30 checks passed
@Valentin271 Valentin271 deleted the perf/benches-clone branch August 11, 2023 07:54
@joshka joshka added this to the v0.23.0 milestone Aug 21, 2023
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.

None yet

3 participants