[Scummvm-git-logs] scummvm branch-2-2 -> dcf445e52df81f9ffb81c41b798aeeef72fe1101

AReim1982 alexander at areim.de
Thu Oct 8 13:44:53 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dcf445e52d WII: File system access performance optimization


Commit: dcf445e52df81f9ffb81c41b798aeeef72fe1101
    https://github.com/scummvm/scummvm/commit/dcf445e52df81f9ffb81c41b798aeeef72fe1101
Author: Alexander Reim (alexander at areim.de)
Date: 2020-10-08T15:43:09+02:00

Commit Message:
WII: File system access performance optimization

Games load up to 30 times faster. For example, the Zork games took up to 10 minutes to start. Now they load in under 20 seconds. Similar improvements can be seen in the massadd feature.

Changed paths:
    backends/fs/wii/wii-fs.cpp


diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 2d33ab3c9f..eb0beed166 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -152,8 +152,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
 	if (_path.empty())
 		return getDevopChildren(list, mode, hidden);
 
-	DIR* dp = opendir (_path.c_str());
-	DIR* tmpdir;
+	DIR *dp = opendir (_path.c_str());
 
 	if (dp == NULL)
 		return false;
@@ -169,13 +168,7 @@ bool WiiFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
 		  newPath += '/';
 		newPath += pent->d_name;
 
-		bool isDir = false;
-		tmpdir = opendir(newPath.c_str());
-		if(tmpdir)
-		{
-			isDir = true;
-			closedir(tmpdir);
-		}
+		bool isDir = ( pent->d_type == DT_DIR );
 
 		if ((mode == Common::FSNode::kListFilesOnly && isDir) ||
 			(mode == Common::FSNode::kListDirectoriesOnly && !isDir))




More information about the Scummvm-git-logs mailing list