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(scrollbar): const creation #963

Merged
merged 2 commits into from Feb 24, 2024

Conversation

EdJoPaTo
Copy link
Member

@EdJoPaTo EdJoPaTo commented Feb 23, 2024

While doing other things in the Scrollbar widget I used a bunch of lints to improve things. A bunch of const fn allow for more performance and Default now uses the const new implementations.

For simplicity reasons I created Scrollbar::new_with_symbols for a cleaner new without calling orientation() on new.

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

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

Project coverage is 91.7%. Comparing base (d0067c8) to head (f4cda78).

Files Patch % Lines
src/widgets/scrollbar.rs 62.2% 23 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##            main    #963     +/-   ##
=======================================
- Coverage   91.9%   91.7%   -0.3%     
=======================================
  Files         61      61             
  Lines      15729   15742     +13     
=======================================
- Hits       14462   14440     -22     
- Misses      1267    1302     +35     

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

@EdJoPaTo EdJoPaTo changed the title fix(scrollbar): performance and useful new() perf(scrollbar): const creation Feb 24, 2024
Copy link
Member

@Valentin271 Valentin271 left a comment

Choose a reason for hiding this comment

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

This looks good, thank you!

@Valentin271 Valentin271 merged commit 65e7923 into ratatui-org:main Feb 24, 2024
38 of 39 checks passed
@EdJoPaTo EdJoPaTo deleted the scrollbar-performance branch February 24, 2024 20:43
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

4 participants