{"action":"created","issue":{"url":"https://api.github.com/repos/Samsung/GearVRf/issues/109","labels_url":"https://api.github.com/repos/Samsung/GearVRf/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/Samsung/GearVRf/issues/109/comments","events_url":"https://api.github.com/repos/Samsung/GearVRf/issues/109/events","html_url":"https://github.com/Samsung/GearVRf/pull/109","id":84275754,"number":109,"title":"Add resource caching.","user":{"login":"JonShemitz","id":11304782,"avatar_url":"https://avatars.githubusercontent.com/u/11304782?v=3","gravatar_id":"","url":"https://api.github.com/users/JonShemitz","html_url":"https://github.com/JonShemitz","followers_url":"https://api.github.com/users/JonShemitz/followers","following_url":"https://api.github.com/users/JonShemitz/following{/other_user}","gists_url":"https://api.github.com/users/JonShemitz/gists{/gist_id}","starred_url":"https://api.github.com/users/JonShemitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonShemitz/subscriptions","organizations_url":"https://api.github.com/users/JonShemitz/orgs","repos_url":"https://api.github.com/users/JonShemitz/repos","events_url":"https://api.github.com/users/JonShemitz/events{/privacy}","received_events_url":"https://api.github.com/users/JonShemitz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-03T00:17:20Z","updated_at":"2015-06-05T00:04:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Samsung/GearVRf/pulls/109","html_url":"https://github.com/Samsung/GearVRf/pull/109","diff_url":"https://github.com/Samsung/GearVRf/pull/109.diff","patch_url":"https://github.com/Samsung/GearVRf/pull/109.patch"},"body":"Adds a simple Map<> from GVRAndroidResource to\r\nWeakReference<GVRHybridObject>. Adds hooks to\r\nall the resource loading methods to use the\r\ncache. Now, loading a resource that's still\r\nin memory should simply yield the existing\r\nresource, even if that load was finished before\r\nthe new request.\r\n\r\nAlso closes all 'redundant' GVRAndroidResource-s,\r\nto minimize the number of open file handles.\r\n\r\nThere is some ugliness here, because of the \r\nasynchronous package: the cache is often read\r\nin the org.gearvrf package, but mostly populated\r\nin the org.gearvrf.asynchronous package. I started\r\nto move the asynchronous classes into the 'root'\r\npackage, but this made for a *lot* of changes: in \r\nthe end, I put the new ResourceCache class in the\r\nutility directory, and passed pointers to cache \r\ninstances down into the async package.\r\n\r\nGearVRf-DCO-1.0-Signed-off-by: Jon Shemitz\r\nj.shemitz@samsung.com"},"comment":{"url":"https://api.github.com/repos/Samsung/GearVRf/issues/comments/109099852","html_url":"https://github.com/Samsung/GearVRf/pull/109#issuecomment-109099852","issue_url":"https://api.github.com/repos/Samsung/GearVRf/issues/109","id":109099852,"user":{"login":"JonShemitz","id":11304782,"avatar_url":"https://avatars.githubusercontent.com/u/11304782?v=3","gravatar_id":"","url":"https://api.github.com/users/JonShemitz","html_url":"https://github.com/JonShemitz","followers_url":"https://api.github.com/users/JonShemitz/followers","following_url":"https://api.github.com/users/JonShemitz/following{/other_user}","gists_url":"https://api.github.com/users/JonShemitz/gists{/gist_id}","starred_url":"https://api.github.com/users/JonShemitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JonShemitz/subscriptions","organizations_url":"https://api.github.com/users/JonShemitz/orgs","repos_url":"https://api.github.com/users/JonShemitz/repos","events_url":"https://api.github.com/users/JonShemitz/events{/privacy}","received_events_url":"https://api.github.com/users/JonShemitz/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T00:04:20Z","updated_at":"2015-06-05T00:04:20Z","body":"> is there an existing app this was tested against?\r\n\r\nI just added some `onStep()` code to Solar System to reload the sun texture or the sphere object: in both cases, it 'found' the existing resource."}}