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

other: Speed up first draw and first data collection #1100

Merged
merged 3 commits into from Apr 15, 2023

Conversation

ClementTsang
Copy link
Owner

@ClementTsang ClementTsang commented Apr 15, 2023

Description

A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), please provide screenshots of the changes:

This PR has two main changes:

  • Draw once ASAP after initialization to quickly produce a visual UI, even if devoid of data.
  • Shorten data initialization sleep (for many cases) and load it earlier to load the first batch of data a bit faster.

Issue

If applicable, what issue does this address?

Closes: #

Testing

If relevant, please state how this was tested. All changes must be tested to work:

If this is a code change, please also indicate which platforms were tested:

  • Windows
  • macOS
  • Linux

Checklist

If relevant, ensure the following have been met:

  • Areas your change affects have been linted using rustfmt (cargo fmt)
  • The change has been tested and doesn't appear to cause any unintended breakage
  • Documentation has been added/updated if needed (README.md, help menu, doc pages, etc.)
  • The pull request passes the provided CI pipeline
  • There are no merge conflicts
  • If relevant, new tests were added (don't worry too much about coverage)

Previously, I would only do the first draw after an event triggered, so
this just makes it so that I *always* draw once first. Some widgets look
a bit weird with no data, but this is fine I guess if we want to gain a
bit of responsiveness.
@codecov
Copy link

codecov bot commented Apr 15, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: -0.01 ⚠️

Comparison is base (fa1f497) 25.79% compared to head (59f7c5c) 25.79%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1100      +/-   ##
==========================================
- Coverage   25.79%   25.79%   -0.01%     
==========================================
  Files          94       94              
  Lines       15492    15509      +17     
==========================================
+ Hits         3996     4000       +4     
- Misses      11496    11509      +13     
Flag Coverage Δ
macos-12 27.15% <57.14%> (-0.01%) ⬇️
ubuntu-latest 27.11% <57.14%> (-0.01%) ⬇️
windows-2019 27.16% <2.85%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/app/data_harvester.rs 0.00% <0.00%> (ø)
src/app/layout_manager.rs 81.17% <0.00%> (ø)
src/bin/main.rs 37.66% <100.00%> (+1.13%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ClementTsang ClementTsang changed the title other: Improve first draw and first data collection times other: Speed up first draw and first data collection Apr 15, 2023
@ClementTsang ClementTsang force-pushed the fast_first_draw branch 2 times, most recently from f36efec to 3c14602 Compare April 15, 2023 01:47
@ClementTsang ClementTsang marked this pull request as ready for review April 15, 2023 02:51
@ClementTsang ClementTsang merged commit 20902e8 into master Apr 15, 2023
32 checks passed
@ClementTsang ClementTsang deleted the fast_first_draw branch April 15, 2023 04:15
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

1 participant