Skip to content

Remove limits on path lengths and directory entry count#259

Open
subtervisor wants to merge 8 commits intoprofi200:masterfrom
subtervisor:remove_browser_limits
Open

Remove limits on path lengths and directory entry count#259
subtervisor wants to merge 8 commits intoprofi200:masterfrom
subtervisor:remove_browser_limits

Conversation

@subtervisor
Copy link
Contributor

Removes the hard-coded limits on path lengths and maximum number of files in a directory.

This allows arbitrarily-long filenames to be loaded, as well as long paths to be saved as the last path. In addition, it removes the 1000 file limit and allows for loading directories of arbitrary size.

@profi200
Copy link
Owner

Was this tested with very large directories? At some point this will run out of memory and in the future i expect less memory to be available because the planned GUI will eat some of it.

@subtervisor
Copy link
Contributor Author

I tried with a directory containing 1500 ROMs and it handled it fine. I haven't tried with larger amounts, though it's also worth mentioning that this defaults to smaller amounts. Unfortunately, there's no way to do pagination or anything else, other than maybe re-loading the directory and skipping entries...

@subtervisor
Copy link
Contributor Author

Is there a way to view available heap space? It would be good to do comparisons and have a way to know whether or not limiting directory size is a premature optimization.

@subtervisor subtervisor force-pushed the remove_browser_limits branch from 706a741 to 8eeabbe Compare December 30, 2025 06:43
…nitial size based on the length of the passed in base path
@subtervisor
Copy link
Contributor Author

Switched over to using FCRAM for the built up directory entries structure to avoid having to worry about memory limits (128MB seems like more than enough to handle the directory browsing/GUI memory needs, imo)

It also adjusts the code to handle arbitrary-length basepaths properly

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