mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-12-23 06:57:08 +00:00
Some code was calling more than one of these functions in a row (in particular, FileUtil.cpp itself did it a lot...), which is a waste since it's possible to call stat a single time and then read all three values from the stat struct. This commit adds a File::FileInfo class that calls stat once on construction and then lets Exists/IsDirectory/GetSize be executed very quickly. The performance improvement mostly matters for functions that can be handling a lot of files, such as File::ScanDirectoryTree. I've also done some cleanup in code that uses these functions. For instance, some code had checks like !Exists() || !IsDirectory(), which is functionally equivalent to !IsDirectory(), and some code was using File::GetSize even though there was an IOFile object that the code could call GetSize on. |
||
|---|---|---|
| .. | ||
| AddUSBDeviceDiag.cpp | ||
| AddUSBDeviceDiag.h | ||
| AdvancedConfigPane.cpp | ||
| AdvancedConfigPane.h | ||
| AudioConfigPane.cpp | ||
| AudioConfigPane.h | ||
| ConfigMain.cpp | ||
| ConfigMain.h | ||
| GameCubeConfigPane.cpp | ||
| GameCubeConfigPane.h | ||
| GCAdapterConfigDiag.cpp | ||
| GCAdapterConfigDiag.h | ||
| GeneralConfigPane.cpp | ||
| GeneralConfigPane.h | ||
| InterfaceConfigPane.cpp | ||
| InterfaceConfigPane.h | ||
| PathConfigPane.cpp | ||
| PathConfigPane.h | ||
| WiiConfigPane.cpp | ||
| WiiConfigPane.h | ||