{"action":"closed","issue":{"url":"https://api.github.com/repos/bumptech/glide/issues/1170","repository_url":"https://api.github.com/repos/bumptech/glide","labels_url":"https://api.github.com/repos/bumptech/glide/issues/1170/labels{/name}","comments_url":"https://api.github.com/repos/bumptech/glide/issues/1170/comments","events_url":"https://api.github.com/repos/bumptech/glide/issues/1170/events","html_url":"https://github.com/bumptech/glide/issues/1170","id":151995194,"number":1170,"title":"calculateBestThreadCount does disk IO so had bad performance","user":{"login":"danml","id":6116816,"avatar_url":"https://avatars.githubusercontent.com/u/6116816?v=3","gravatar_id":"","url":"https://api.github.com/users/danml","html_url":"https://github.com/danml","followers_url":"https://api.github.com/users/danml/followers","following_url":"https://api.github.com/users/danml/following{/other_user}","gists_url":"https://api.github.com/users/danml/gists{/gist_id}","starred_url":"https://api.github.com/users/danml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danml/subscriptions","organizations_url":"https://api.github.com/users/danml/orgs","repos_url":"https://api.github.com/users/danml/repos","events_url":"https://api.github.com/users/danml/events{/privacy}","received_events_url":"https://api.github.com/users/danml/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bumptech/glide/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/bumptech/glide/labels/enhancement","name":"enhancement","color":"207de5"},{"url":"https://api.github.com/repos/bumptech/glide/labels/v4","name":"v4","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"sjudd","id":1627211,"avatar_url":"https://avatars.githubusercontent.com/u/1627211?v=3","gravatar_id":"","url":"https://api.github.com/users/sjudd","html_url":"https://github.com/sjudd","followers_url":"https://api.github.com/users/sjudd/followers","following_url":"https://api.github.com/users/sjudd/following{/other_user}","gists_url":"https://api.github.com/users/sjudd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjudd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjudd/subscriptions","organizations_url":"https://api.github.com/users/sjudd/orgs","repos_url":"https://api.github.com/users/sjudd/repos","events_url":"https://api.github.com/users/sjudd/events{/privacy}","received_events_url":"https://api.github.com/users/sjudd/received_events","type":"User","site_admin":false},"assignees":[{"login":"sjudd","id":1627211,"avatar_url":"https://avatars.githubusercontent.com/u/1627211?v=3","gravatar_id":"","url":"https://api.github.com/users/sjudd","html_url":"https://github.com/sjudd","followers_url":"https://api.github.com/users/sjudd/followers","following_url":"https://api.github.com/users/sjudd/following{/other_user}","gists_url":"https://api.github.com/users/sjudd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjudd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjudd/subscriptions","organizations_url":"https://api.github.com/users/sjudd/orgs","repos_url":"https://api.github.com/users/sjudd/repos","events_url":"https://api.github.com/users/sjudd/events{/privacy}","received_events_url":"https://api.github.com/users/sjudd/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/bumptech/glide/milestones/5","html_url":"https://github.com/bumptech/glide/milestones/4.0","labels_url":"https://api.github.com/repos/bumptech/glide/milestones/5/labels","id":812599,"number":5,"title":"4.0","description":"Features/bugs that can only be fixed with breaking changes.","creator":{"login":"sjudd","id":1627211,"avatar_url":"https://avatars.githubusercontent.com/u/1627211?v=3","gravatar_id":"","url":"https://api.github.com/users/sjudd","html_url":"https://github.com/sjudd","followers_url":"https://api.github.com/users/sjudd/followers","following_url":"https://api.github.com/users/sjudd/following{/other_user}","gists_url":"https://api.github.com/users/sjudd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjudd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjudd/subscriptions","organizations_url":"https://api.github.com/users/sjudd/orgs","repos_url":"https://api.github.com/users/sjudd/repos","events_url":"https://api.github.com/users/sjudd/events{/privacy}","received_events_url":"https://api.github.com/users/sjudd/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":71,"state":"open","created_at":"2014-10-03T13:30:57Z","updated_at":"2016-08-09T17:17:21Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-04-30T00:49:36Z","updated_at":"2016-08-09T17:17:21Z","closed_at":"2016-08-09T17:17:21Z","body":"GlideExecutor.calculateBestThreadCount seems to be doing disk IO and will trigger strict mode violations in some cases when used on the UI thread.\r\n\r\nhttps://github.com/bumptech/glide/blob/4d2e710411c940d6824b52b654939ef21733ec37/library/src/main/java/com/bumptech/glide/load/engine/executor/GlideExecutor.java#L169\r\n\r\n```ruby\r\n...\r\nStrictMode:    at java.io.UnixFileSystem.list(UnixFileSystem.java:300)\r\nStrictMode:    at java.io.File.list(File.java:1057)\r\nStrictMode:    at java.io.File.listFiles(File.java:1175)\r\nStrictMode:    at com.bumptech.glide.load.engine.executor.GlideExecutor.calculateBestThreadCount(GlideExecutor.java:247)\r\nStrictMode:    at com.bumptech.glide.load.engine.executor.GlideExecutor.newSourceExecutor(GlideExecutor.java:102)\r\nStrictMode:    at com.bumptech.glide.GlideBuilder.createGlide(GlideBuilder.java:267)\r\nStrictMode:    at com.bumptech.glide.Glide.get(Glide.java:155)\r\nStrictMode:    at com.bumptech.glide.manager.RequestManagerRetriever.getApplicationManager(RequestManagerRetriever.java:88)\r\nStrictMode:    at com.bumptech.glide.manager.RequestManagerRetriever.get(RequestManagerRetriever.java:112)\r\nStrictMode:    at com.bumptech.glide.Glide.with(Glide.java:431)\r\n...\r\n```"}}
{"actor":{"display_login":"sjudd"}}