ProffieOS icon indicating copy to clipboard operation
ProffieOS copied to clipboard

Why does the OS prefer font sounds in subfolder structure?

Open NoSloppy opened this issue 5 years ago • 3 comments

Just adding this issue as a reminder that for some reason, there are more Audio Underflows and blade performance hits when all the wavs are in one folder together as opposed to grouped into subfolders of like sounds.

NoSloppy avatar Jul 07 '20 16:07 NoSloppy

Read up on the FAT32 format. It seems like each block can contain 16 file entries. So, if you have 128 files in one directory, it has to read on average 4 blocks to find the the file. If you have 16 subdirectories with 16 files each, only 2 blocks has to be read. It may be possible to optimize this by adding most commonly used files(hum) first. Also, ProffieOS might be able to improve on this with some caching.

For effects that only have one sound, it should be more efficient to not put them into a sub-directory.

profezzorn avatar Jul 07 '20 21:07 profezzorn

Seems like this can be closed for now?

NoSloppy avatar Aug 18 '20 21:08 NoSloppy

I'm still contemplating ways to make file lookups faster. :)

profezzorn avatar Aug 18 '20 21:08 profezzorn