From fa208c4acd54ecd078121e05b6572f7cb49ede94 Mon Sep 17 00:00:00 2001 From: Techjar Date: Sat, 6 Jun 2020 05:22:55 -0400 Subject: [PATCH] Qt/GameListModel: Use absolutePath for file path column canonicalPath is orders of magnitude slower as it has to perform actual disk I/O to resolve symlinks, which makes sorting by this column ridiculously slow for large game lists, especially if the games are on a NAS. We probably don't need that, simply resolving relative paths should be sufficient. --- Source/Core/DolphinQt/GameList/GameListModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/GameList/GameListModel.cpp b/Source/Core/DolphinQt/GameList/GameListModel.cpp index 2a42da3303..922beba660 100644 --- a/Source/Core/DolphinQt/GameList/GameListModel.cpp +++ b/Source/Core/DolphinQt/GameList/GameListModel.cpp @@ -146,7 +146,7 @@ QVariant GameListModel::data(const QModelIndex& index, int role) const if (role == Qt::DisplayRole || role == Qt::InitialSortOrderRole) { QString file_path = QDir::toNativeSeparators( - QFileInfo(QString::fromStdString(game.GetFilePath())).canonicalPath()); + QFileInfo(QString::fromStdString(game.GetFilePath())).absolutePath()); if (!file_path.endsWith(QDir::separator())) file_path.append(QDir::separator()); return file_path;