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

Replace StaticText with LVGL labels. #3310

Merged
merged 11 commits into from
Mar 26, 2023
Merged

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Mar 5, 2023

Getting rid of the StaticText labels and using LVGL labels instead also improves the load time.

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 6, 2023

I did some timing tests with the simulator on my iMac.

Time (in nanoseconds) to build the GVARS page:

  • The current main branch = 1828000
  • EdgeTX/gvars_speedup branch = 1537000 (84%)
  • EdgeTX/gvars_speedup + EdgeTX/libopenui/speedup = 1252000 (68%)
  • philmoz/gvars_speedup = 817000 (45%)

While the libopenui changes certainly help, removing the StaticText and Window objects entirely from the GVarButton class gives the biggest improvement.

@gagarinlg
Copy link
Member

Wow
Maybe you could disabe the clock and printf stuff again? I will then accept the PR in my branch.

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 6, 2023

I've removed all the diagnostics.

@gagarinlg
Copy link
Member

Did you test this with the NV14 simu?

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 6, 2023

Did you test this with the NV14 simu?

Oops - I was a bit too aggressive with the optimisation. Fixed now.

@gagarinlg
Copy link
Member

😂👍
There was a reason I added that container window

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 7, 2023

I've separated the style from the widget and used state to change the background colour and font size.
This is a tiny bit slower but hopefully not noticeable.

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 16, 2023

The latest commit further improves the performance on the GVARS page.
The overall time to display the page content is better; but the main improvement is the initial object creation time is drastically reduced by delaying the main content initialisation.

This improves the responsiveness when navigating between tabs - there is no longer a big delay on this page before you can move to another tab.

@pfeerick pfeerick added this to the 2.9 milestone Mar 23, 2023
@pfeerick
Copy link
Member

Can you rebase this one for me... it looks like it will be a clean rebase, but if you do git won't assign dual authorship to the commits ;)

Am I right in believing that this effectively supersedes #3307. And merging in EdgeTX/libopenui#88 shouldn't break anything in conjunction with this? Just double checking as it seems to all be working fine here 😇

@philmoz
Copy link
Collaborator Author

philmoz commented Mar 26, 2023

I rebased to main; but it is showing a conflict with model_gvars.cpp - not sure what I did wrong?

The libopenui PR should be fine.

@pfeerick
Copy link
Member

pfeerick commented Mar 26, 2023

Ah, sorry, I'm an idiot... I didn't look at the target branch and was thinking it was to go into main, not Malte's speedup branch, 🤦 Ok, I'll just try something, and if that doesn't work, can go via that branch... maybe 😆

edit: Looks like that did what it should have, since this was rebased on main.

@pfeerick pfeerick changed the base branch from gvars_speedup to main March 26, 2023 06:58
gagarinlg chore(ui): improve static text and window base speed (EdgeTX#88)
@pfeerick pfeerick added the color Related generally to color LCD radios label Mar 26, 2023
@pfeerick pfeerick merged commit 5622cb9 into EdgeTX:main Mar 26, 2023
@philmoz philmoz deleted the gvars_speedup branch October 9, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
color Related generally to color LCD radios
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants