Skip to content

fix(APP): loading perf changes#542

Open
kalicyh wants to merge 1 commit intoNext-Flip:devfrom
kalicyh:feat/loading
Open

fix(APP): loading perf changes#542
kalicyh wants to merge 1 commit intoNext-Flip:devfrom
kalicyh:feat/loading

Conversation

@kalicyh
Copy link
Copy Markdown

@kalicyh kalicyh commented Apr 13, 2026

Summary

This ports the momentum_app loading optimization without bringing in any localization changes.

Changes

  • lazy-load mainmenu_app_labels and mainmenu_app_exes only when entering the related scene
  • lazy-load asset_pack_names only when entering the asset pack scene
  • release both cached lists when no longer needed
  • avoid building large VariableItemList/Submenu content until the corresponding subpage is actually opened
  • keep UI strings unchanged from the target branch

Why

Opening momentum_app was doing too much work up front:

  • scanning asset packs during app alloc
  • building menu app label/exe lists eagerly
  • keeping large temporary lists alive longer than necessary

This reduces startup cost and lowers peak memory pressure when opening the app.

Notes

This PR intentionally excludes CN/localization changes and only keeps the loading/perf behavior changes.

Copilot AI review requested due to automatic review settings April 13, 2026 17:21
@kalicyh kalicyh requested a review from 956MB as a code owner April 13, 2026 17:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

@kalicyh
Copy link
Copy Markdown
Author

kalicyh commented Apr 13, 2026

I've implemented the ability to freely switch between Chinese fonts in my Chinese firmware, and the firmware size looks decent at 880,473 bytes, leaving 167 bytes of free space compared to the previous 880,640 bytes.

This submission addresses a problem I encountered and resolved while developing the Chinese firmware. They were experiencing issues with the mntm application taking too long to open and even freezing, so I made the above changes.

If you also think it's good, you can adopt it.

@WillyJL
Copy link
Copy Markdown
Member

WillyJL commented Apr 13, 2026

Why?

you explained the effect it has, but not why it was needed. no one has ever complained of opening the momentum app being slow or having other issues to my knowledge

also, we explicitly do not want AI contributions

@WillyJL
Copy link
Copy Markdown
Member

WillyJL commented Apr 13, 2026

They were experiencing issues with the mntm application taking too long to open and even freezing, so I made the above changes.

this to me rather sounds like the AI that hallucinated some goofy way of doing this:

I've implemented the ability to freely switch between Chinese fonts in my Chinese firmware

made many mistakes and created an issue that didnt exist before, and this was a workaround

@kalicyh
Copy link
Copy Markdown
Author

kalicyh commented Apr 14, 2026

Can you give me some suggestions on how to optimize it?
CleanShot 2026-04-14 at 08 20 54@2x
CleanShot 2026-04-14 at 08 21 27@2x

kalicyh@5d1f0ad

The modifications may not have been perfect, but they were effective.

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.

3 participants