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
zip archive always loaded into RAM #2400
Comments
Is this the reason we experience slower cache generation in RoR with Ogre 13 also? |
probably. Although generation should not be noticeable slower. update should be - i.e. if you only want to read some file metadata without reading the whole file. |
eh dont really know, here we parse https://github.com/tritonas00/rigs-of-rods/blob/12d8ece21d0453f66803e356fd2cebe6943e1875/source/main/resources/CacheSystem.cpp#L997 i remember though if we dont unload at the end, we had massive ram usage |
currently, we load the complete zip archive into RAM when opening:
ogre/OgreMain/src/OgreZip.cpp
Line 104 in aa76042
this increases the loading time, if the majority of the contents are not read.
this is a zip API limitation, which only allows passing buffers when externally opening the file.
The underlying miniz API actually allows passing read callbacks:
https://github.com/richgel999/miniz/blob/5a38f5564a092462817b97014f4477c8f0783f8f/miniz_zip.h#L173-L175
using these would allow seeking in the file, which improves loading time in the above scenario.
The text was updated successfully, but these errors were encountered: