ohlidalp / ror-toolkit

5 stars 4 forks source link

All resources loaded on startup - very slow startup for most users. #2

Open ohlidalp opened 8 years ago

ohlidalp commented 8 years ago

_Reported by Aivar on forums_

http://www.rigsofrods.com/threads/120839-RoRToolkit-is-coming-back-to-life?p=1390893&viewfull=1#post1390893

It takes a long time to load the toolkit if there are a lot of .zip files in the packs folder (I have 1695 .zip files atm and it takes about 4 minutes for the toolkit to open). The toolkit loads every single material file on startup. Is it like this to prevent delays when displaying the previews in the toolkit?

ohlidalp commented 8 years ago

This is largely fault of OGRE engine. It's resource system is MEGA-ineffective.

Anyway, it appears the toolkit simply adds "Resource locations" for RoR's resource folders, which causes everything to be loaded at once.

OGRE is fully capable of loading individual ZIPs or directories (not separate files) at any time, so I can technically implement more fine-grained control.

disloyalpick commented 8 years ago

I believe upon opening the toolkit also self compiles.

ohlidalp commented 8 years ago

@disloyalpick That's normal - it's written in Python :grinning:

Python normally saves it's compiled bytecode as ".pyc" files. However, RoRToolkit R2 automatically launches a .bat script which recursively erases them. I'm not sure whether it's just a forgotten development utility or it's needed. I'll try disabling it in next testbuild and see what happens.

Anyway, the compilation overhead is marginal compared to OGRE resource system overhead.