Filesystem: Rewrite finding file info by path for performance

Instead of calling GetPathFromFSTOffset for every file info, FindFileInfo
now only looks at names in directories that are included in the path.
For the common case of searching for "opening.bnr", this means that
only root-level files and directories have to be searched through.
This commit is contained in:
JosJuice
2015-07-30 17:12:44 +02:00
parent 7c45afecb2
commit f49b64caff
2 changed files with 59 additions and 3 deletions

View File

@ -61,6 +61,7 @@ private:
u32 m_offset_shift;
std::vector<FileInfoGCWii> m_FileInfoVector;
const FileInfo* FindFileInfo(const std::string& path, size_t search_start_offset) const;
std::string GetStringFromOffset(u64 _Offset) const;
bool DetectFileSystem();
void InitFileSystem();