Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
525 stars 137 forks source link

Slow start up when there are many audio and graphic files #110

Closed chosenofbear closed 4 years ago

chosenofbear commented 9 years ago

I am running mkxp in Windows. If there are few audio and graphic files, mkxp starts very fast. But if I set the RTP path in conf file or run mkxp in a project with many files, it will take quite some seconds for mkxp to start. Does mkxp pre-load all files when starting up?

Ancurio commented 9 years ago

By default mkxp will scan all accessible files to build up a cache so it can emulate the filename case-insensitivity of Windows. To disable this, put pathCache=false in your conf.

chosenofbear commented 9 years ago

That works. There is a huge performance difference. Is there a way to improve this? Can we disable this option by default in Windows build? It seems Windows does not need this anyway.

Ancurio commented 9 years ago

Can we disable this option by default in Windows build? It seems Windows does not need this anyway.

I wonder, is it worth the trouble? =) There's some edge cases that might arise, eg. case inconsistencies might suddenly show up if you take an asset folder and zip it up or make an rgssad archive out of it because a wrong cased filename would be embedded in the archive (assets might show up as missing). Right now that just works transparently.

So far mkxp has only been used for working with finished games where only the required minimum set of files are present in the game folder, but if this is something hit more often by people using mkxp during development of a game, it could be worth adding to the Readme.