[Scummvm-git-logs] scummvm master -> 92e37fd810d195855f6563828cbbd41a22761dee

AReim1982 alexander at areim.de
Sat Sep 26 15:55:02 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:
92e37fd810 WII: File system access performance optimization


Commit: 92e37fd810d195855f6563828cbbd41a22761dee
    https://github.com/scummvm/scummvm/commit/92e37fd810d195855f6563828cbbd41a22761dee
Author: Alexander Reim (alexander at areim.de)
Date: 2020-09-26T17:54:50+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