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

TETRAEDGE: Cache Resource Files #5714

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

Conversation

andrewglass
Copy link

TETRAEDGE: Cache Resource Files

Modify TeCore's file searching behaviour to make use of a
Common::FSDirectory cache of the games resources folder.
This greatly reduces the time spent when looking up
resources during gameplay and loading.
The original behaviour exhibited multi second long
pauses when navigating Syberia 1's main menu and
longer pauses when trying to load a saved game.
With these changes all pause is eliminated.

The pauses were observed on a Windows 10 machine
with powerful hardware (5700x cpu and nvme SSD) so
the appearance and length of them were unexpected.

Make use of Common::FSDirectory cache of Resources folder to greatly accelerate lookup of  game assets at runtime.
@mduggan
Copy link
Contributor

mduggan commented Mar 17, 2024

Thanks! In a release build it performed fine on MacOS so I never looked into optimizing it. I'll give this a test and merge assuming it looks god.

@mduggan mduggan self-assigned this Mar 21, 2024
@mduggan
Copy link
Contributor

mduggan commented Apr 8, 2024

@andrewglass Thanks again for trying to improve this. I gave your branch a try, but it seems on macOS at least to break existing game entries - they fail with:
WARNING: Game data path does not exist or is not a directory ([current/detection/path]/Contents)!
I'm sure there's room for improvement in the current code so I'm happy to get a patch if we can work this bug out..

@sev-
Copy link
Member

sev- commented Apr 24, 2024

In general, what is the reason for using FSNodes like that?

The conventional way would be to add the relevant directory with SearchMan.addDirectory() . Was there a problem with this approach?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants