{"action":"created","issue":{"url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/10","labels_url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/10/comments","events_url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/10/events","html_url":"https://github.com/acm-ndsu/SonicFlow/issues/10","id":33053795,"number":10,"title":"Cache only selected result in a search","user":{"login":"jghibiki","id":6537066,"avatar_url":"https://avatars.githubusercontent.com/u/6537066?v=3","gravatar_id":"","url":"https://api.github.com/users/jghibiki","html_url":"https://github.com/jghibiki","followers_url":"https://api.github.com/users/jghibiki/followers","following_url":"https://api.github.com/users/jghibiki/following{/other_user}","gists_url":"https://api.github.com/users/jghibiki/gists{/gist_id}","starred_url":"https://api.github.com/users/jghibiki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jghibiki/subscriptions","organizations_url":"https://api.github.com/users/jghibiki/orgs","repos_url":"https://api.github.com/users/jghibiki/repos","events_url":"https://api.github.com/users/jghibiki/events{/privacy}","received_events_url":"https://api.github.com/users/jghibiki/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/acm-ndsu/SonicFlow/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2014-05-08T04:26:30Z","updated_at":"2015-02-27T15:29:59Z","closed_at":null,"body":"I've noticed that when we make a search, sonicflow appears to be caching every item returned by grooveshark. I think that only caching the result selected for play  by the user would make more effective use of the cache storage, but in addition would result in many less-relevant items from being cached to sonicflow (and hopefully making better use of the updated search algorithm more below on this). This idea follows two assumptions, \r\n\r\n1. Songs that have been played before should be considered \"more relevant\" as search results than those not explicitly played. Also, a song that has been played at least once, has a higher chance of being played again than never being played again.\r\n2. Other search results returned by grooveshark may be relevant but not notable or confirm-ably relevant to be worth caching on the local server.\r\n\r\n###########################################\r\n\r\nImpact in combination with the search algorithm:\r\n\r\n I have noticed that the new search algorithm produces notably more relevant results, but almost only when going to grooveshark for results. When searching the local cache, the results seem relevant only down to a single word or two with the truly relevant results hidden in a long list of fakes."},"comment":{"url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/comments/76412192","html_url":"https://github.com/acm-ndsu/SonicFlow/issues/10#issuecomment-76412192","issue_url":"https://api.github.com/repos/acm-ndsu/SonicFlow/issues/10","id":76412192,"user":{"login":"dekarrin","id":801239,"avatar_url":"https://avatars.githubusercontent.com/u/801239?v=3","gravatar_id":"","url":"https://api.github.com/users/dekarrin","html_url":"https://github.com/dekarrin","followers_url":"https://api.github.com/users/dekarrin/followers","following_url":"https://api.github.com/users/dekarrin/following{/other_user}","gists_url":"https://api.github.com/users/dekarrin/gists{/gist_id}","starred_url":"https://api.github.com/users/dekarrin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dekarrin/subscriptions","organizations_url":"https://api.github.com/users/dekarrin/orgs","repos_url":"https://api.github.com/users/dekarrin/repos","events_url":"https://api.github.com/users/dekarrin/events{/privacy}","received_events_url":"https://api.github.com/users/dekarrin/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T15:29:59Z","updated_at":"2015-02-27T15:29:59Z","body":"We need to be sure that it's specifically the Grooveshark search that is slowing down SonicFlow. Granted, groovepydown is reverse engineering the search, but as far as I can tell it's making the same calls that your browser does, so it shouldn't affect the search speed.\r\n\r\nI know that originally we were making many calls to third-party APIs for song/album/art information. This never really panned out (not perfectly anyways), and I suspect that these calls (to TinySong/Gracenote/whatever) are what is taking the majority of the time.\r\n\r\nSay you return 200 results from a grooveshark search (The maximum grooveshark will return). If I'm not mistaken, this means 200 individual calls to third party databases for song metadata. If that is the case, it is likely that this is what is slowing down a grooveshark search, and not the grooveshark call itself. I believe that the code should be analyzed to see if this is happening."}}