{"action":"created","comment":{"url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/comments/277706765","pull_request_review_id":229586689,"id":277706765,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI3NzcwNjc2NQ==","diff_hunk":"@@ -30,13 +31,101 @@\n #include \"yuzu/ui_settings.h\"\n \n namespace {\n+\n+template <typename T>\n+T GetGameListCachedObject(const std::string& filename, const std::string& ext,\n+                          const std::function<T()>& generator);\n+\n+template <>\n+QString GetGameListCachedObject(const std::string& filename, const std::string& ext,\n+                                const std::function<QString()>& generator) {\n+    if (!UISettings::values.cache_game_list || filename == \"0000000000000000\")\n+        return generator();\n+\n+    const auto& path = FileUtil::GetUserPath(FileUtil::UserPath::CacheDir) + DIR_SEP + \"game_list\" +\n+                       DIR_SEP + filename + \".\" + ext;","path":"src/yuzu/game_list_worker.cpp","position":24,"original_position":24,"commit_id":"7925135d80865d4e6f0c5ea07d5ed8d1e809d508","original_commit_id":"7925135d80865d4e6f0c5ea07d5ed8d1e809d508","user":{"login":"lioncash","id":712067,"node_id":"MDQ6VXNlcjcxMjA2Nw==","avatar_url":"https://avatars1.githubusercontent.com/u/712067?v=4","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"```suggestion\r\n                       DIR_SEP + filename + '.' + ext;\r\n```","created_at":"2019-04-23T14:26:45Z","updated_at":"2019-04-23T14:32:03Z","html_url":"https://github.com/yuzu-emu/yuzu/pull/2431#discussion_r277706765","pull_request_url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/comments/277706765"},"html":{"href":"https://github.com/yuzu-emu/yuzu/pull/2431#discussion_r277706765"},"pull_request":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431"}}},"pull_request":{"url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431","id":272754512,"node_id":"MDExOlB1bGxSZXF1ZXN0MjcyNzU0NTEy","html_url":"https://github.com/yuzu-emu/yuzu/pull/2431","diff_url":"https://github.com/yuzu-emu/yuzu/pull/2431.diff","patch_url":"https://github.com/yuzu-emu/yuzu/pull/2431.patch","issue_url":"https://api.github.com/repos/yuzu-emu/yuzu/issues/2431","number":2431,"state":"open","locked":false,"title":"yuzu: Implement a caching mechanism for the game list","user":{"login":"DarkLordZach","id":5064800,"node_id":"MDQ6VXNlcjUwNjQ4MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5064800?v=4","gravatar_id":"","url":"https://api.github.com/users/DarkLordZach","html_url":"https://github.com/DarkLordZach","followers_url":"https://api.github.com/users/DarkLordZach/followers","following_url":"https://api.github.com/users/DarkLordZach/following{/other_user}","gists_url":"https://api.github.com/users/DarkLordZach/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkLordZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkLordZach/subscriptions","organizations_url":"https://api.github.com/users/DarkLordZach/orgs","repos_url":"https://api.github.com/users/DarkLordZach/repos","events_url":"https://api.github.com/users/DarkLordZach/events{/privacy}","received_events_url":"https://api.github.com/users/DarkLordZach/received_events","type":"User","site_admin":false},"body":"Currently, the game list can drag (for up to 10 seconds) with a large collection of games and/or add-ons. This is because the current algorithm searches the entire list of addons for each game when populating the names for the \"Add-Ons\" column (which is terribly inefficient and unnecessary). This adds a simple cache that writes the list of addon names and versions to a text file in yuzu_dir/cache/game_list. This will also cache the icons and names of titles, as after add-ons those are the next two biggest time consumers.\r\n\r\nI tested this for time difference in two different configurations (one 'light' with about 5 games + 3 updates and one 'heavy' with about 30 games + 20 updates/dlc) In the light the load time went from about 4 seconds to sub 1 second and in the heavy the load time went from about 17 seconds to about 2.\r\n\r\nThe UI to fully manage this is part of PR #2430.","created_at":"2019-04-23T14:24:01Z","updated_at":"2019-04-23T14:32:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea6ce1ca146dc5d43c7f0ac1d801d25a0b7b3bd6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1015401243,"node_id":"MDU6TGFiZWwxMDE1NDAxMjQz","url":"https://api.github.com/repos/yuzu-emu/yuzu/labels/frontend-new","name":"frontend-new","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431/commits","review_comments_url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431/comments","review_comment_url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yuzu-emu/yuzu/issues/2431/comments","statuses_url":"https://api.github.com/repos/yuzu-emu/yuzu/statuses/7925135d80865d4e6f0c5ea07d5ed8d1e809d508","head":{"label":"DarkLordZach:game-list-cache","ref":"game-list-cache","sha":"7925135d80865d4e6f0c5ea07d5ed8d1e809d508","user":{"login":"DarkLordZach","id":5064800,"node_id":"MDQ6VXNlcjUwNjQ4MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5064800?v=4","gravatar_id":"","url":"https://api.github.com/users/DarkLordZach","html_url":"https://github.com/DarkLordZach","followers_url":"https://api.github.com/users/DarkLordZach/followers","following_url":"https://api.github.com/users/DarkLordZach/following{/other_user}","gists_url":"https://api.github.com/users/DarkLordZach/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkLordZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkLordZach/subscriptions","organizations_url":"https://api.github.com/users/DarkLordZach/orgs","repos_url":"https://api.github.com/users/DarkLordZach/repos","events_url":"https://api.github.com/users/DarkLordZach/events{/privacy}","received_events_url":"https://api.github.com/users/DarkLordZach/received_events","type":"User","site_admin":false},"repo":{"id":137008966,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcwMDg5NjY=","name":"yuzu","full_name":"DarkLordZach/yuzu","private":false,"owner":{"login":"DarkLordZach","id":5064800,"node_id":"MDQ6VXNlcjUwNjQ4MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/5064800?v=4","gravatar_id":"","url":"https://api.github.com/users/DarkLordZach","html_url":"https://github.com/DarkLordZach","followers_url":"https://api.github.com/users/DarkLordZach/followers","following_url":"https://api.github.com/users/DarkLordZach/following{/other_user}","gists_url":"https://api.github.com/users/DarkLordZach/gists{/gist_id}","starred_url":"https://api.github.com/users/DarkLordZach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DarkLordZach/subscriptions","organizations_url":"https://api.github.com/users/DarkLordZach/orgs","repos_url":"https://api.github.com/users/DarkLordZach/repos","events_url":"https://api.github.com/users/DarkLordZach/events{/privacy}","received_events_url":"https://api.github.com/users/DarkLordZach/received_events","type":"User","site_admin":false},"html_url":"https://github.com/DarkLordZach/yuzu","description":"Nintendo Switch Emulator","fork":true,"url":"https://api.github.com/repos/DarkLordZach/yuzu","forks_url":"https://api.github.com/repos/DarkLordZach/yuzu/forks","keys_url":"https://api.github.com/repos/DarkLordZach/yuzu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DarkLordZach/yuzu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DarkLordZach/yuzu/teams","hooks_url":"https://api.github.com/repos/DarkLordZach/yuzu/hooks","issue_events_url":"https://api.github.com/repos/DarkLordZach/yuzu/issues/events{/number}","events_url":"https://api.github.com/repos/DarkLordZach/yuzu/events","assignees_url":"https://api.github.com/repos/DarkLordZach/yuzu/assignees{/user}","branches_url":"https://api.github.com/repos/DarkLordZach/yuzu/branches{/branch}","tags_url":"https://api.github.com/repos/DarkLordZach/yuzu/tags","blobs_url":"https://api.github.com/repos/DarkLordZach/yuzu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DarkLordZach/yuzu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DarkLordZach/yuzu/git/refs{/sha}","trees_url":"https://api.github.com/repos/DarkLordZach/yuzu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DarkLordZach/yuzu/statuses/{sha}","languages_url":"https://api.github.com/repos/DarkLordZach/yuzu/languages","stargazers_url":"https://api.github.com/repos/DarkLordZach/yuzu/stargazers","contributors_url":"https://api.github.com/repos/DarkLordZach/yuzu/contributors","subscribers_url":"https://api.github.com/repos/DarkLordZach/yuzu/subscribers","subscription_url":"https://api.github.com/repos/DarkLordZach/yuzu/subscription","commits_url":"https://api.github.com/repos/DarkLordZach/yuzu/commits{/sha}","git_commits_url":"https://api.github.com/repos/DarkLordZach/yuzu/git/commits{/sha}","comments_url":"https://api.github.com/repos/DarkLordZach/yuzu/comments{/number}","issue_comment_url":"https://api.github.com/repos/DarkLordZach/yuzu/issues/comments{/number}","contents_url":"https://api.github.com/repos/DarkLordZach/yuzu/contents/{+path}","compare_url":"https://api.github.com/repos/DarkLordZach/yuzu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DarkLordZach/yuzu/merges","archive_url":"https://api.github.com/repos/DarkLordZach/yuzu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DarkLordZach/yuzu/downloads","issues_url":"https://api.github.com/repos/DarkLordZach/yuzu/issues{/number}","pulls_url":"https://api.github.com/repos/DarkLordZach/yuzu/pulls{/number}","milestones_url":"https://api.github.com/repos/DarkLordZach/yuzu/milestones{/number}","notifications_url":"https://api.github.com/repos/DarkLordZach/yuzu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DarkLordZach/yuzu/labels{/name}","releases_url":"https://api.github.com/repos/DarkLordZach/yuzu/releases{/id}","deployments_url":"https://api.github.com/repos/DarkLordZach/yuzu/deployments","created_at":"2018-06-12T02:55:08Z","updated_at":"2018-09-23T13:19:09Z","pushed_at":"2019-04-23T13:14:59Z","git_url":"git://github.com/DarkLordZach/yuzu.git","ssh_url":"git@github.com:DarkLordZach/yuzu.git","clone_url":"https://github.com/DarkLordZach/yuzu.git","svn_url":"https://github.com/DarkLordZach/yuzu","homepage":"","size":29834,"stargazers_count":2,"watchers_count":2,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"yuzu-emu:master","ref":"master","sha":"4fad91ca4501af51822a35d5f251c6cf486f5041","user":{"login":"yuzu-emu","id":35075882,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc1ODgy","avatar_url":"https://avatars1.githubusercontent.com/u/35075882?v=4","gravatar_id":"","url":"https://api.github.com/users/yuzu-emu","html_url":"https://github.com/yuzu-emu","followers_url":"https://api.github.com/users/yuzu-emu/followers","following_url":"https://api.github.com/users/yuzu-emu/following{/other_user}","gists_url":"https://api.github.com/users/yuzu-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzu-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzu-emu/subscriptions","organizations_url":"https://api.github.com/users/yuzu-emu/orgs","repos_url":"https://api.github.com/users/yuzu-emu/repos","events_url":"https://api.github.com/users/yuzu-emu/events{/privacy}","received_events_url":"https://api.github.com/users/yuzu-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":116167731,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNjc3MzE=","name":"yuzu","full_name":"yuzu-emu/yuzu","private":false,"owner":{"login":"yuzu-emu","id":35075882,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDc1ODgy","avatar_url":"https://avatars1.githubusercontent.com/u/35075882?v=4","gravatar_id":"","url":"https://api.github.com/users/yuzu-emu","html_url":"https://github.com/yuzu-emu","followers_url":"https://api.github.com/users/yuzu-emu/followers","following_url":"https://api.github.com/users/yuzu-emu/following{/other_user}","gists_url":"https://api.github.com/users/yuzu-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzu-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzu-emu/subscriptions","organizations_url":"https://api.github.com/users/yuzu-emu/orgs","repos_url":"https://api.github.com/users/yuzu-emu/repos","events_url":"https://api.github.com/users/yuzu-emu/events{/privacy}","received_events_url":"https://api.github.com/users/yuzu-emu/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/yuzu-emu/yuzu","description":"Nintendo Switch Emulator","fork":false,"url":"https://api.github.com/repos/yuzu-emu/yuzu","forks_url":"https://api.github.com/repos/yuzu-emu/yuzu/forks","keys_url":"https://api.github.com/repos/yuzu-emu/yuzu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yuzu-emu/yuzu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yuzu-emu/yuzu/teams","hooks_url":"https://api.github.com/repos/yuzu-emu/yuzu/hooks","issue_events_url":"https://api.github.com/repos/yuzu-emu/yuzu/issues/events{/number}","events_url":"https://api.github.com/repos/yuzu-emu/yuzu/events","assignees_url":"https://api.github.com/repos/yuzu-emu/yuzu/assignees{/user}","branches_url":"https://api.github.com/repos/yuzu-emu/yuzu/branches{/branch}","tags_url":"https://api.github.com/repos/yuzu-emu/yuzu/tags","blobs_url":"https://api.github.com/repos/yuzu-emu/yuzu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yuzu-emu/yuzu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yuzu-emu/yuzu/git/refs{/sha}","trees_url":"https://api.github.com/repos/yuzu-emu/yuzu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yuzu-emu/yuzu/statuses/{sha}","languages_url":"https://api.github.com/repos/yuzu-emu/yuzu/languages","stargazers_url":"https://api.github.com/repos/yuzu-emu/yuzu/stargazers","contributors_url":"https://api.github.com/repos/yuzu-emu/yuzu/contributors","subscribers_url":"https://api.github.com/repos/yuzu-emu/yuzu/subscribers","subscription_url":"https://api.github.com/repos/yuzu-emu/yuzu/subscription","commits_url":"https://api.github.com/repos/yuzu-emu/yuzu/commits{/sha}","git_commits_url":"https://api.github.com/repos/yuzu-emu/yuzu/git/commits{/sha}","comments_url":"https://api.github.com/repos/yuzu-emu/yuzu/comments{/number}","issue_comment_url":"https://api.github.com/repos/yuzu-emu/yuzu/issues/comments{/number}","contents_url":"https://api.github.com/repos/yuzu-emu/yuzu/contents/{+path}","compare_url":"https://api.github.com/repos/yuzu-emu/yuzu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yuzu-emu/yuzu/merges","archive_url":"https://api.github.com/repos/yuzu-emu/yuzu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yuzu-emu/yuzu/downloads","issues_url":"https://api.github.com/repos/yuzu-emu/yuzu/issues{/number}","pulls_url":"https://api.github.com/repos/yuzu-emu/yuzu/pulls{/number}","milestones_url":"https://api.github.com/repos/yuzu-emu/yuzu/milestones{/number}","notifications_url":"https://api.github.com/repos/yuzu-emu/yuzu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yuzu-emu/yuzu/labels{/name}","releases_url":"https://api.github.com/repos/yuzu-emu/yuzu/releases{/id}","deployments_url":"https://api.github.com/repos/yuzu-emu/yuzu/deployments","created_at":"2018-01-03T18:13:57Z","updated_at":"2019-04-23T14:19:26Z","pushed_at":"2019-04-23T14:24:02Z","git_url":"git://github.com/yuzu-emu/yuzu.git","ssh_url":"git@github.com:yuzu-emu/yuzu.git","clone_url":"https://github.com/yuzu-emu/yuzu.git","svn_url":"https://github.com/yuzu-emu/yuzu","homepage":"","size":28941,"stargazers_count":6847,"watchers_count":6847,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":102,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":439,"open_issues":102,"watchers":6847,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431"},"html":{"href":"https://github.com/yuzu-emu/yuzu/pull/2431"},"issue":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/issues/2431"},"comments":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/issues/2431/comments"},"review_comments":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431/comments"},"review_comment":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/pulls/2431/commits"},"statuses":{"href":"https://api.github.com/repos/yuzu-emu/yuzu/statuses/7925135d80865d4e6f0c5ea07d5ed8d1e809d508"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lioncash"}}