{"action":"created","issue":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/337","repository_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin","labels_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/337/labels{/name}","comments_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/337/comments","events_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/337/events","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/337","id":195982695,"number":337,"title":"Performance improvement to assets/api/readFolder","user":{"login":"mikenz","id":6816,"avatar_url":"https://avatars.githubusercontent.com/u/6816?v=3","gravatar_id":"","url":"https://api.github.com/users/mikenz","html_url":"https://github.com/mikenz","followers_url":"https://api.github.com/users/mikenz/followers","following_url":"https://api.github.com/users/mikenz/following{/other_user}","gists_url":"https://api.github.com/users/mikenz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikenz/subscriptions","organizations_url":"https://api.github.com/users/mikenz/orgs","repos_url":"https://api.github.com/users/mikenz/repos","events_url":"https://api.github.com/users/mikenz/events{/privacy}","received_events_url":"https://api.github.com/users/mikenz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-12-16T05:14:58Z","updated_at":"2017-01-08T19:51:36Z","closed_at":"2017-01-08T19:51:36Z","pull_request":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/pulls/337","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/337","diff_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/337.diff","patch_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/337.patch"},"body":"I have a few folders with 900+ images in them. This was the change I made to get reasonable performance in asset-admin. \r\n\r\nOnly get the full details about a file after we have decided to return it."},"comment":{"url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/comments/271174484","html_url":"https://github.com/silverstripe/silverstripe-asset-admin/pull/337#issuecomment-271174484","issue_url":"https://api.github.com/repos/silverstripe/silverstripe-asset-admin/issues/337","id":271174484,"user":{"login":"chillu","id":111025,"avatar_url":"https://avatars.githubusercontent.com/u/111025?v=3","gravatar_id":"","url":"https://api.github.com/users/chillu","html_url":"https://github.com/chillu","followers_url":"https://api.github.com/users/chillu/followers","following_url":"https://api.github.com/users/chillu/following{/other_user}","gists_url":"https://api.github.com/users/chillu/gists{/gist_id}","starred_url":"https://api.github.com/users/chillu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chillu/subscriptions","organizations_url":"https://api.github.com/users/chillu/orgs","repos_url":"https://api.github.com/users/chillu/repos","events_url":"https://api.github.com/users/chillu/events{/privacy}","received_events_url":"https://api.github.com/users/chillu/received_events","type":"User","site_admin":false},"created_at":"2017-01-08T19:51:36Z","updated_at":"2017-01-08T19:51:36Z","body":"@mikenz I'm closing this in favour of https://github.com/silverstripe/silverstripe-framework/pull/6458. Have tried it out with 1000 files in a folder (generated with https://github.com/silverstripe/silverstripe-frameworktest/pull/26), and 128M `memory_limit`. I'm getting 3.5s response times for 50 paginated items (with already generated thumbnails), so it's not exactly fast.\r\n\r\nThe logic is quite different now (with GraphQL), so this PR isn't really mergeable any more. The optimisations it implements (only get full details of file after returning) aren't fully reflected in the work. Given it does the pagination *before* querying all records (as part of converting to a `ArrayList` for `canView()` checks), any unnecessary record fetches where `canView() = false` shouldn't be as impactful, right? We don't have a good way to \"fill up\" paginated lists where most or all records have `canView() = false`, but that's beyond the scope of this discussion.\r\n\r\nWould you be able to switch to the PR branches mentioned above and check if that solves the problem for you?"}}
{"actor":{"display_login":"chillu"}}