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

feat(sim): startup can be slow when scanning SYSTEM audio files #5822

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philmoz
Copy link
Collaborator

@philmoz philmoz commented Jan 22, 2025

The simulator f_readdir() function calls f_stat for each file in the directory.
This can be slow especially on network drives when the code is scanning the SYSTEM sounds folder, looking for the system sounds.

This PR changes the logic for the simulator to loop over the system sound files names, calling f_stat() for each one.

On my Mac this reduces the sound file scan time from 5.7s to 1.4s when reading from a NAS drive.

@philmoz philmoz added enhancement ✨ New feature or request simulator labels Jan 22, 2025
@philmoz philmoz added this to the 2.11 milestone Jan 22, 2025
@pfeerick pfeerick changed the title feat(simu): simulator startup can be slow when scanning SYSTEM audio files. feat(sim): startup can be slow when scanning SYSTEM audio files Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request simulator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant