#3358 closed enhancement (fixed)
[PATCH] TerrainTextureManager file loading rewrite
Reported by: | leper | Owned by: | leper |
---|---|---|---|
Priority: | Nice to Have | Milestone: | Alpha 20 |
Component: | Core engine | Keywords: | patch |
Cc: | Patch: |
Description
Currently terrain texture loading is done using a custom directory traversal logic. The attached patch enhances vfs::ForEachFile
to take a directory callback which is then used to load the terrain.xml
(which should be considered required now, since using the parent dir's is not really possible anymore).
Should we add a new function instead of extending vfs::ForEachFile
which could eg call it (without recursing?)?
I did some measurements (see the FIXME/TODO) and the new code is about as fast as the old one (I did drop all caches, but used unbundled files). The comment also seems slightly outdated since r12306 reorganized the terrain file layout organization a bit.
Attachments (1)
Change History (6)
by , 9 years ago
Attachment: | terraintexturemanager_file_loading.patch added |
---|
follow-up: 2 comment:1 by , 9 years ago
comment:2 by , 9 years ago
Replying to Itms:
I don't know that code much so I don't have a real opinion. The code looks nice, apart from a missing space line 75 of vfs_util.cpp.
No, see the coding conventions and the exception about source/lib
.
Do you want someone to test some situation where it could lead to a bug?
Someone doing another profile would be nice. I got similar results both before and after the patch. (Someone doing a test with an actual archive would be awesome.)
comment:3 by , 9 years ago
Milestone: | Alpha 19 → Alpha 20 |
---|
comment:5 by , 8 years ago
Keywords: | review removed |
---|
I don't know that code much so I don't have a real opinion. The code looks nice, apart from a missing space line 75 of vfs_util.cpp.
Do you want someone to test some situation where it could lead to a bug?