Skip to content

Dsimenu faster loading - #2718

Closed
Arno500 wants to merge 5 commits into
DS-Homebrew:masterfrom
Arno500:dsimenu-faster-loading
Closed

Arno500 wants to merge 5 commits into
DS-Homebrew:masterfrom
Arno500:dsimenu-faster-loading

Conversation

@Arno500

@Arno500 Arno500 commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #2717

What's changed?

Basically improve the loading time of the game list.
One of the most useful fixes are the index and how files are read and tested while loading a page. This improves quite a lot the loading of each page because there is way less polling on the SD card for every entry.

Was AI used?

What was AI used for?

Investigate where the time was spent on, and to implement the fix.

Where have you tested it?

Tested on my own DSi


Pull Request status

  • This PR has been tested using the latest version of devkitARM and libnds.

Arno500 and others added 5 commits November 29, 2026 20:14
With the box art cache, folders skipped the box art load, so a folder's
slot kept the box art of whatever entry had been there before. Folders
now go through the same lookup and get marked as having no box art.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
moveCursor(), getFileInfo(), previousPage() and nextPage() took the
directory listing by value, copying every entry's name on each call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finding an entry's box art took up to four access() calls, each
resolving the path from the card root, and each miss scanning the whole
box art folder. The folder is now listed once and lookups are answered
from memory (DSi-class consoles; non-ASCII names still fall back to
access()). The cache loader and the top screen share the same lookup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bgOperations() runs once per directory entry while loading, and each call
formatted the date and time into strings. Both now return early unless
the second (or the colon blink) changed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- libfat cache raised from 64 KB to 256 KB per drive in DSi mode, so
  folders and FAT sectors stay cached while loading.
- DSi/3DS themes: box art is opened once instead of getFileSize() +
  fopen().

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Arno500 Arno500 mentioned this pull request Nov 29, 2026
2 of 3 tasks
@RocketRobz

Copy link
Copy Markdown
Member

Closing, since it sounds like AI was used to write the whole code.
If you've written the code on your side without the use of AI for this PR, this can be re-opened.

@RocketRobz RocketRobz closed this Nov 30, 2026
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.

2 participants