{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/58319776","id":58319776,"diff_hunk":"@@ -79,8 +79,21 @@ class ResourceCacheSharedItems : public Dependency  {\n /// Base class for resource caches.\n class ResourceCache : public QObject {\n     Q_OBJECT\n+    Q_PROPERTY(int numTotal READ getNumTotalResources NOTIFY dirty)","path":"libraries/networking/src/ResourceCache.h","position":4,"original_position":4,"commit_id":"3c86191a59f7f68cdcb0526b071480151e598cb5","original_commit_id":"3c86191a59f7f68cdcb0526b071480151e598cb5","user":{"login":"jherico","id":1533642,"avatar_url":"https://avatars.githubusercontent.com/u/1533642?v=3","gravatar_id":"","url":"https://api.github.com/users/jherico","html_url":"https://github.com/jherico","followers_url":"https://api.github.com/users/jherico/followers","following_url":"https://api.github.com/users/jherico/following{/other_user}","gists_url":"https://api.github.com/users/jherico/gists{/gist_id}","starred_url":"https://api.github.com/users/jherico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jherico/subscriptions","organizations_url":"https://api.github.com/users/jherico/orgs","repos_url":"https://api.github.com/users/jherico/repos","events_url":"https://api.github.com/users/jherico/events{/privacy}","received_events_url":"https://api.github.com/users/jherico/received_events","type":"User","site_admin":false},"body":"I would prefer if these were named `getXXXCount` and `getXXXSize`.  Also, I would recomment using size_t for both of them.","created_at":"2016-04-03T23:33:06Z","updated_at":"2016-04-03T23:33:06Z","html_url":"https://github.com/highfidelity/hifi/pull/7549#discussion_r58319776","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7549","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/58319776"},"html":{"href":"https://github.com/highfidelity/hifi/pull/7549#discussion_r58319776"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7549"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/7549","id":65026441,"html_url":"https://github.com/highfidelity/hifi/pull/7549","diff_url":"https://github.com/highfidelity/hifi/pull/7549.diff","patch_url":"https://github.com/highfidelity/hifi/pull/7549.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/7549","number":7549,"state":"open","locked":false,"title":"Add a visualization of cacheable resource usage","user":{"login":"zzmp","id":5403956,"avatar_url":"https://avatars.githubusercontent.com/u/5403956?v=3","gravatar_id":"","url":"https://api.github.com/users/zzmp","html_url":"https://github.com/zzmp","followers_url":"https://api.github.com/users/zzmp/followers","following_url":"https://api.github.com/users/zzmp/following{/other_user}","gists_url":"https://api.github.com/users/zzmp/gists{/gist_id}","starred_url":"https://api.github.com/users/zzmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzmp/subscriptions","organizations_url":"https://api.github.com/users/zzmp/orgs","repos_url":"https://api.github.com/users/zzmp/repos","events_url":"https://api.github.com/users/zzmp/events{/privacy}","received_events_url":"https://api.github.com/users/zzmp/received_events","type":"User","site_admin":false},"body":"- Move plotperf qml visualization to a shared folder\r\n- Changes plotperf to poll and redraw at 10fps\r\n- Clean ResourceCache to avoid exposing dangerous methods\r\n- Add counter properties to ResourceCache for count and size, total and cached\r\n- Add resources property to ResourceCache to list active resource URLs\r\n- Expose Animation, Model, Texture, Sound caches to QML/JS\r\n- Add cacheStats.js to show cache count/size\r\n\r\n---\r\n\r\n#### Intent\r\nWe are seeing slow rendering because of high resource usage. This is meant to show if resources are being freed or not, whether they are being held by something or cached appropriately, and whether the caches are releasing resources appropriately\r\n(See: https://app.asana.com/0/74051501495175/105559909158465.)\r\n\r\n#### Testing\r\n\r\n- Ensure that renderStats.js still works.\r\n- Ensure that cacheStats.js works as expected. It should show resource usage. Take it for a spin across a few domains :smile:.\r\n- Check TextureCache.resources in the JS console (or ModelCache, AnimationCache, SoundCache) and see the loaded/loading resources in your domain.\r\n\r\n*NOTE: You may notice a large amount of texture usage (400Mb) without it being cached after visiting the playa. This is fixed in #7546, and is exactly the kind of thing this tool is meant to help find.*","created_at":"2016-04-02T03:12:36Z","updated_at":"2016-04-03T23:33:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d5cdb811fffeb9754ecd69faa6a68e9e018bf47d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7549/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/7549/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/7549/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/3c86191a59f7f68cdcb0526b071480151e598cb5","head":{"label":"zzmp:feat/resource-vis","ref":"feat/resource-vis","sha":"3c86191a59f7f68cdcb0526b071480151e598cb5","user":{"login":"zzmp","id":5403956,"avatar_url":"https://avatars.githubusercontent.com/u/5403956?v=3","gravatar_id":"","url":"https://api.github.com/users/zzmp","html_url":"https://github.com/zzmp","followers_url":"https://api.github.com/users/zzmp/followers","following_url":"https://api.github.com/users/zzmp/following{/other_user}","gists_url":"https://api.github.com/users/zzmp/gists{/gist_id}","starred_url":"https://api.github.com/users/zzmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzmp/subscriptions","organizations_url":"https://api.github.com/users/zzmp/orgs","repos_url":"https://api.github.com/users/zzmp/repos","events_url":"https://api.github.com/users/zzmp/events{/privacy}","received_events_url":"https://api.github.com/users/zzmp/received_events","type":"User","site_admin":false},"repo":{"id":45364529,"name":"hifi","full_name":"zzmp/hifi","owner":{"login":"zzmp","id":5403956,"avatar_url":"https://avatars.githubusercontent.com/u/5403956?v=3","gravatar_id":"","url":"https://api.github.com/users/zzmp","html_url":"https://github.com/zzmp","followers_url":"https://api.github.com/users/zzmp/followers","following_url":"https://api.github.com/users/zzmp/following{/other_user}","gists_url":"https://api.github.com/users/zzmp/gists{/gist_id}","starred_url":"https://api.github.com/users/zzmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zzmp/subscriptions","organizations_url":"https://api.github.com/users/zzmp/orgs","repos_url":"https://api.github.com/users/zzmp/repos","events_url":"https://api.github.com/users/zzmp/events{/privacy}","received_events_url":"https://api.github.com/users/zzmp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zzmp/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/zzmp/hifi","forks_url":"https://api.github.com/repos/zzmp/hifi/forks","keys_url":"https://api.github.com/repos/zzmp/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zzmp/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zzmp/hifi/teams","hooks_url":"https://api.github.com/repos/zzmp/hifi/hooks","issue_events_url":"https://api.github.com/repos/zzmp/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/zzmp/hifi/events","assignees_url":"https://api.github.com/repos/zzmp/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/zzmp/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/zzmp/hifi/tags","blobs_url":"https://api.github.com/repos/zzmp/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zzmp/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zzmp/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/zzmp/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zzmp/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/zzmp/hifi/languages","stargazers_url":"https://api.github.com/repos/zzmp/hifi/stargazers","contributors_url":"https://api.github.com/repos/zzmp/hifi/contributors","subscribers_url":"https://api.github.com/repos/zzmp/hifi/subscribers","subscription_url":"https://api.github.com/repos/zzmp/hifi/subscription","commits_url":"https://api.github.com/repos/zzmp/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/zzmp/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/zzmp/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/zzmp/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/zzmp/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/zzmp/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zzmp/hifi/merges","archive_url":"https://api.github.com/repos/zzmp/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zzmp/hifi/downloads","issues_url":"https://api.github.com/repos/zzmp/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/zzmp/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/zzmp/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/zzmp/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zzmp/hifi/labels{/name}","releases_url":"https://api.github.com/repos/zzmp/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/zzmp/hifi/deployments","created_at":"2015-11-02T01:02:18Z","updated_at":"2016-03-24T20:39:17Z","pushed_at":"2016-04-03T19:38:21Z","git_url":"git://github.com/zzmp/hifi.git","ssh_url":"git@github.com:zzmp/hifi.git","clone_url":"https://github.com/zzmp/hifi.git","svn_url":"https://github.com/zzmp/hifi","homepage":"","size":193935,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"5fa9f662fcf5d2a46c9aa3810641bf3f024956b2","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/highfidelity/hifi/deployments","created_at":"2012-08-10T18:26:22Z","updated_at":"2016-04-02T09:36:07Z","pushed_at":"2016-04-03T23:32:21Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":238284,"stargazers_count":363,"watchers_count":363,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":216,"mirror_url":null,"open_issues_count":56,"forks":216,"open_issues":56,"watchers":363,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7549"},"html":{"href":"https://github.com/highfidelity/hifi/pull/7549"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/7549"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/7549/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7549/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/7549/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/3c86191a59f7f68cdcb0526b071480151e598cb5"}}}}