{"action":"created","issue":{"url":"https://api.github.com/repos/diaspora/diaspora/issues/6787","repository_url":"https://api.github.com/repos/diaspora/diaspora","labels_url":"https://api.github.com/repos/diaspora/diaspora/issues/6787/labels{/name}","comments_url":"https://api.github.com/repos/diaspora/diaspora/issues/6787/comments","events_url":"https://api.github.com/repos/diaspora/diaspora/issues/6787/events","html_url":"https://github.com/diaspora/diaspora/issues/6787","id":146514697,"number":6787,"title":"Search bar triggeres a a request to load all contacts","user":{"login":"denschub","id":344777,"avatar_url":"https://avatars.githubusercontent.com/u/344777?v=3","gravatar_id":"","url":"https://api.github.com/users/denschub","html_url":"https://github.com/denschub","followers_url":"https://api.github.com/users/denschub/followers","following_url":"https://api.github.com/users/denschub/following{/other_user}","gists_url":"https://api.github.com/users/denschub/gists{/gist_id}","starred_url":"https://api.github.com/users/denschub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/denschub/subscriptions","organizations_url":"https://api.github.com/users/denschub/orgs","repos_url":"https://api.github.com/users/denschub/repos","events_url":"https://api.github.com/users/denschub/events{/privacy}","received_events_url":"https://api.github.com/users/denschub/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/diaspora/diaspora/labels/regression","name":"regression","color":"FF281B"}],"state":"open","locked":false,"assignee":{"login":"svbergerem","id":3798614,"avatar_url":"https://avatars.githubusercontent.com/u/3798614?v=3","gravatar_id":"","url":"https://api.github.com/users/svbergerem","html_url":"https://github.com/svbergerem","followers_url":"https://api.github.com/users/svbergerem/followers","following_url":"https://api.github.com/users/svbergerem/following{/other_user}","gists_url":"https://api.github.com/users/svbergerem/gists{/gist_id}","starred_url":"https://api.github.com/users/svbergerem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svbergerem/subscriptions","organizations_url":"https://api.github.com/users/svbergerem/orgs","repos_url":"https://api.github.com/users/svbergerem/repos","events_url":"https://api.github.com/users/svbergerem/events{/privacy}","received_events_url":"https://api.github.com/users/svbergerem/received_events","type":"User","site_admin":false},"assignees":[{"login":"svbergerem","id":3798614,"avatar_url":"https://avatars.githubusercontent.com/u/3798614?v=3","gravatar_id":"","url":"https://api.github.com/users/svbergerem","html_url":"https://github.com/svbergerem","followers_url":"https://api.github.com/users/svbergerem/followers","following_url":"https://api.github.com/users/svbergerem/following{/other_user}","gists_url":"https://api.github.com/users/svbergerem/gists{/gist_id}","starred_url":"https://api.github.com/users/svbergerem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svbergerem/subscriptions","organizations_url":"https://api.github.com/users/svbergerem/orgs","repos_url":"https://api.github.com/users/svbergerem/repos","events_url":"https://api.github.com/users/svbergerem/events{/privacy}","received_events_url":"https://api.github.com/users/svbergerem/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/diaspora/diaspora/milestones/14","html_url":"https://github.com/diaspora/diaspora/milestones/0.6.0.0","labels_url":"https://api.github.com/repos/diaspora/diaspora/milestones/14/labels","id":1063323,"number":14,"title":"0.6.0.0","description":"","creator":{"login":"jhass","id":141294,"avatar_url":"https://avatars.githubusercontent.com/u/141294?v=3","gravatar_id":"","url":"https://api.github.com/users/jhass","html_url":"https://github.com/jhass","followers_url":"https://api.github.com/users/jhass/followers","following_url":"https://api.github.com/users/jhass/following{/other_user}","gists_url":"https://api.github.com/users/jhass/gists{/gist_id}","starred_url":"https://api.github.com/users/jhass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhass/subscriptions","organizations_url":"https://api.github.com/users/jhass/orgs","repos_url":"https://api.github.com/users/jhass/repos","events_url":"https://api.github.com/users/jhass/events{/privacy}","received_events_url":"https://api.github.com/users/jhass/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":368,"state":"open","created_at":"2015-04-11T18:44:30Z","updated_at":"2016-08-10T02:53:09Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2016-04-07T05:37:58Z","updated_at":"2016-08-10T06:31:27Z","closed_at":null,"body":"Regression of #6293.\r\n\r\nDue to [app/assets/javascripts/app/views/search_base_view.js:26](https://github.com/diaspora/diaspora/blob/develop/app/assets/javascripts/app/views/search_base_view.js#L26), a request to `/contacts.json` is made every time the search view gets initialized. Since this json contains literally all the users contacts, users with a large contact base can cause quite a huge amount of traffic and database load...\r\n\r\n@svbergerem why is the prefetching needed here?\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/32696197-search-bar-triggeres-a-a-request-to-load-all-contacts?utm_campaign=plugin&utm_content=tracker%2F522&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/diaspora/diaspora/issues/comments/238777391","html_url":"https://github.com/diaspora/diaspora/issues/6787#issuecomment-238777391","issue_url":"https://api.github.com/repos/diaspora/diaspora/issues/6787","id":238777391,"user":{"login":"AugierLe42e","id":3429231,"avatar_url":"https://avatars.githubusercontent.com/u/3429231?v=3","gravatar_id":"","url":"https://api.github.com/users/AugierLe42e","html_url":"https://github.com/AugierLe42e","followers_url":"https://api.github.com/users/AugierLe42e/followers","following_url":"https://api.github.com/users/AugierLe42e/following{/other_user}","gists_url":"https://api.github.com/users/AugierLe42e/gists{/gist_id}","starred_url":"https://api.github.com/users/AugierLe42e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AugierLe42e/subscriptions","organizations_url":"https://api.github.com/users/AugierLe42e/orgs","repos_url":"https://api.github.com/users/AugierLe42e/repos","events_url":"https://api.github.com/users/AugierLe42e/events{/privacy}","received_events_url":"https://api.github.com/users/AugierLe42e/received_events","type":"User","site_admin":false},"created_at":"2016-08-10T06:31:27Z","updated_at":"2016-08-10T06:31:27Z","body":"> So if we want to do the search client side, we need to keep the contact list in a cache, but we cannot continue to make a that intensive call to the server each time we refresh the page.\r\n\r\nCould we consider something like persisting the contacts list in a cookie?"}}
{"actor":{"display_login":"AugierLe42e"}}