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

3DS Performance Improvements #16

Open
ajusa opened this issue Dec 30, 2020 · 3 comments
Open

3DS Performance Improvements #16

ajusa opened this issue Dec 30, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ajusa
Copy link
Owner

ajusa commented Dec 30, 2020

Describe the bug
3DS currently has multiple issues with performance, particularly on IO heavy loads.

To Reproduce
Steps to reproduce the behavior:
Play a novel with sound on.

Try profiling both the script load function and just the audio loads to avoid having the profiler mess up the main event loop.

@ajusa ajusa added the enhancement New feature or request label Dec 30, 2020
@ajusa
Copy link
Owner Author

ajusa commented Dec 30, 2020

After profiling script load, found that the ascii function was the main culprit. Rewrote it to be much faster and now script loads are acceptably fast. After profiling audio seems like all of the time is spent in LovePotion calls, not sure why it seems to be slow.

@ajusa
Copy link
Owner Author

ajusa commented Jan 3, 2021

After doing some more digging around and asking the folks on the LovePotion Discord, it seems that the filesystem itself might be the bottleneck when it comes to indexing to a certain file among thousands in a directory.
Options are

  1. Trying to load from a zip file, after PhysFS support is fixed on 3DS
  2. Having a 3DS converter that hashes filenames into a folder in an attempt to split up thousands of files into hundreds per directory

@poudink
Copy link

poudink commented Jan 7, 2021

ZIP support was added to VNDSx precisely for loading time reasons. That's why it only supports uncompressed ZIP files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants