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

Manage CPU consumption of Onion's Apps #107

Open
11 of 12 tasks
schmurtzm opened this issue Aug 22, 2022 · 5 comments
Open
11 of 12 tasks

Manage CPU consumption of Onion's Apps #107

schmurtzm opened this issue Aug 22, 2022 · 5 comments
Assignees
Labels
enhancement New or improved feature
Milestone

Comments

@schmurtzm
Copy link
Member

schmurtzm commented Aug 22, 2022

CPU consumption report :
(Checked when it is solved /optimized)


  • - themeSwitcher : 50% -> too much 🔥
  • - infoPanel : 50% -> too much 🔥
  • - Search: 50% -> too much 🔥

  • - playActivityUI : about 22%, seems a lot for a static UI ?
  • - gameSwitcher : 30% when 0 game in list , seems a lot for a static UI ?
  • - clock: 26% , seems a lot for a static UI ?

  • - installUI : about 30% probably due to SDL animation at the bottom ?
  • - chargingState : about 30-35% during animation, 0% when screen off

  • - keymon & batmon : 0% 👍🏻
  • - packageManager : 0% 👍🏻
  • - Tweaks : 0% 👍🏻

  • - bootScreen : too fast to really know...

@schmurtzm schmurtzm added bug in onion Something isn't working enhancement New or improved feature and removed bug in onion Something isn't working labels Aug 22, 2022
@Aemiii91
Copy link
Member

installUI and chargingState are OK, they have animations.

bootScreen doesn't have a main loop, it's exits immediately after drawing to screen once.

@schmurtzm
Copy link
Member Author

infopanel is fine when we put a sleep into the main while (just tested).

@Aemiii91
Copy link
Member

Aemiii91 commented Jul 4, 2023

Search improved by 486d2f1

@schmurtzm
Copy link
Member Author

schmurtzm commented Nov 10, 2023

Theme Switcher & Clock still requires to be fixed in 4.2.3 ;)

@schmurtzm schmurtzm added this to the v4.3 milestone Nov 10, 2023
@schmurtzm schmurtzm modified the milestones: v4.3, v4.4 Feb 28, 2024
@MattCatz
Copy link
Contributor

Sorry to poke an old issue.

  1. Any reason to not to enable compiler optimization by default? i.e. at least -Og ( I know -Os is enabled for a few of those ). Also enabling LTO for that cross compilation unit optimization?
  2. With Clock specifically, the main event loop seems to run ungoverned. Could you save a bit of cycles by adding a little bit of delay in there and/or only redrawing if the time changes or you get a user input?

I'd be happy to test if you shared your test procedure.

github-merge-queue bot pushed a commit that referenced this issue Oct 17, 2024
No need to redraw if there has not been any events. Poll for events
about every 100 ms. Drops utilization from around 25% to less than 0.

Also swap `-ffunction-sections -fdata-sections` for LTO to save ~5 Kb of
memory when loaded and probably an immeasurable amount of performance.

Below is the size difference using LTO:

![image](https://github.com/user-attachments/assets/65a585ec-3da2-4006-ae34-abca5c8eee95)

Addresses part of issue: #107
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New or improved feature
Projects
Status: 📋 Backlog / To do
Development

No branches or pull requests

4 participants
@schmurtzm @MattCatz @Aemiii91 and others