{"action":"created","issue":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/8019","repository_url":"https://api.github.com/repos/highfidelity/hifi","labels_url":"https://api.github.com/repos/highfidelity/hifi/issues/8019/labels{/name}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/8019/comments","events_url":"https://api.github.com/repos/highfidelity/hifi/issues/8019/events","html_url":"https://github.com/highfidelity/hifi/pull/8019","id":158531704,"number":8019,"title":"Eliminate file IO contentions for settings","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},"labels":[{"url":"https://api.github.com/repos/highfidelity/hifi/labels/QA%20Ready","name":"QA Ready","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-05T00:56:46Z","updated_at":"2016-06-05T01:41:52Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/8019","html_url":"https://github.com/highfidelity/hifi/pull/8019","diff_url":"https://github.com/highfidelity/hifi/pull/8019.diff","patch_url":"https://github.com/highfidelity/hifi/pull/8019.patch"},"body":"This removes most of the use of the QSettings file from the main thread, as well as removing the cost of the frequently constructed / destroy QSettings derived Settings object.\r\n\r\nThe existing code was using short-lived Settings objects when Settings was still derived from QSettings.  This meant file IO was triggered on the main thread every time a Settings object was created or destroyed, which happens every 10 seconds in code called by the `Application::saveSettings`.  Every time this was run, both the `Menu` and `MyAvatar` classes would instantiate a Settings object, write to it and then destroy it, triggering multiple reads, parses and writes of the file.  This is especially painful on lower end machines or those with slower disks.  \r\n\r\nAdditionally, I've decoupled the creation and destruction of the Setting::Handle type from triggering nearly immediate disk writes, even if the handle was never set or the value was the same as the existing written value.  "},"comment":{"url":"https://api.github.com/repos/highfidelity/hifi/issues/comments/223788069","html_url":"https://github.com/highfidelity/hifi/pull/8019#issuecomment-223788069","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/8019","id":223788069,"user":{"login":"kevinmthomas-carpool","id":7095767,"avatar_url":"https://avatars.githubusercontent.com/u/7095767?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinmthomas-carpool","html_url":"https://github.com/kevinmthomas-carpool","followers_url":"https://api.github.com/users/kevinmthomas-carpool/followers","following_url":"https://api.github.com/users/kevinmthomas-carpool/following{/other_user}","gists_url":"https://api.github.com/users/kevinmthomas-carpool/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinmthomas-carpool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinmthomas-carpool/subscriptions","organizations_url":"https://api.github.com/users/kevinmthomas-carpool/orgs","repos_url":"https://api.github.com/users/kevinmthomas-carpool/repos","events_url":"https://api.github.com/users/kevinmthomas-carpool/events{/privacy}","received_events_url":"https://api.github.com/users/kevinmthomas-carpool/received_events","type":"User","site_admin":false},"created_at":"2016-06-05T01:41:51Z","updated_at":"2016-06-05T01:41:51Z","body":"## QA Test\r\n**QA Tester**: KevinMThomas\r\n**localhost 'createTestBlocks.js' Result**: **localhost 'createTestBlocks.js'** SUCCESS\r\n**localhost ATP Upload + Edit Result**: **localhost ATP** SUCCESS\r\n**Echo Server Audio**: **Echo Server Audio** SUCCESS\r\n**localhost 'harmonicOscillator.js' Result**: **localhost 'harmonicOscillator.js'** SUCCESS\r\n**localhost 'reverbTest.js' Result**: **localhost 'reverbTest.js'** SUCCESS\r\n**localhost 'playaPerformanceTest.js' Result**: **localhost 'playaPerformanceTest.js'** SUCCESS\r\n**playa 'playaPerformanceTest.js' Result**: **playa 'playaPerformanceTest.js'** SUCCESS\r\n**cellscience 'playaPerformanceTest.js' Result**: **cellscience 'playaPerformanceTest.js'** SUCCESS\r\n**QA Pass**: **QA Pass** SUCCESS\r\n**Additional Test Results + Observations**:  Able to successfully change setting and they are properly persisted.  Successfully moved edit UI and reloaded and it stayed in position last edited.  Successfully changed Avatar as well.  Edit bar moves and drags smoothly.  Ran ```var value = 1; Script.update.connect(function(){ Settings.setValue(\"FooTestSetting\", value); value++; });``` in console.  ```[06/04 21:33:42] [DEBUG] Total allocation  \"193.31 MB\"``` value before running in console.   Successfully verified no great amount of disk usage used.  ```[06/04 21:36:52] [DEBUG] Total allocation  \"295.99 MB\"```.  This was the value after 5 minutes after the console value was run.  This is a small number differential.\r\n\r\n**Domain** |localhost |Playa |cellscience\r\n---|---|---|---\r\n**Render Rate**: |60 |61 |46\r\n**Present Rate**: |60 |60 |60\r\n**Present New Rate**: |60 |60 |47\r\n**CPU Buffer Count**: |3245 |550 |469\r\n**GPU Buffer Count**: |406 |93 |86\r\n**CPU Memory Usage**: |40407040 |21569536 |19554304\r\n**GPU Memory Usage**: |8593408 |8503296 |5201920\r\n**CPU Texture Count**: |154 |76 |52\r\n**GPU Texture Count**: |371 |342 |339\r\n**GPU Transfer Count**: |0 |0 |0\r\n**CPU Texture Memory Usage**: |178328712 |109298760 |57814088\r\n**GPU Texture Memory Usage**: |301493353 |202810785 |127313316\r\n**GPU Virtual Memory Usage**: |439180393|340497825|265000356\r\n**Triangle Count**: |198660 |205165 |67479\r\n**Triangle Rate**: |11685882 |12068529 |3969352\r\n**API Drawcall Count**: |154 |40 |14\r\n**Drawcall Count**: |158 |40 |14\r\n**Drawcall Rate**: |9294 |2352 |823\r\n**State Changes Texture Count**:|127 |32 |27\r\n**Pipeline Count**: |22 |20 |14\r\n**Item Opaques**: |198 |89 |24\r\n**Item Translucents**: |4 |5 |1\r\n**Item Lights**: |15 |23 |0\r\n**Timing Opaques**: |1435 |492 |244\r\n**Timing Translucents**: |61 |28 |6\r\n**Timing Lighting**: |129 |186 |45\r\n**Render Frame**: |2154 |1602 |836\r\n"}}
{"actor":{"display_login":"kevinmthomas-carpool"}}