{"action":"closed","issue":{"url":"https://api.github.com/repos/talis/tripod-php/issues/32","labels_url":"https://api.github.com/repos/talis/tripod-php/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/talis/tripod-php/issues/32/comments","events_url":"https://api.github.com/repos/talis/tripod-php/issues/32/events","html_url":"https://github.com/talis/tripod-php/issues/32","id":49421441,"number":32,"title":"Selective in-place updates of CBDs","user":{"login":"robotrobot","id":933278,"avatar_url":"https://avatars.githubusercontent.com/u/933278?v=3","gravatar_id":"","url":"https://api.github.com/users/robotrobot","html_url":"https://github.com/robotrobot","followers_url":"https://api.github.com/users/robotrobot/followers","following_url":"https://api.github.com/users/robotrobot/following{/other_user}","gists_url":"https://api.github.com/users/robotrobot/gists{/gist_id}","starred_url":"https://api.github.com/users/robotrobot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robotrobot/subscriptions","organizations_url":"https://api.github.com/users/robotrobot/orgs","repos_url":"https://api.github.com/users/robotrobot/repos","events_url":"https://api.github.com/users/robotrobot/events{/privacy}","received_events_url":"https://api.github.com/users/robotrobot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/talis/tripod-php/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/talis/tripod-php/labels/performance","name":"performance","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-11-19T16:57:33Z","updated_at":"2015-07-08T17:40:23Z","closed_at":"2015-07-08T17:40:23Z","body":"When we update a CBD, we *replace* the whole document in mongo, even if only a small quantity of the fields have been changed or added.\r\n\r\nThis causes very slow updates on CBDs of even moderate size, as the database may need to reallocate space or re-write indexes even if indexed fields have not been updated. \r\n\r\nInstead, use in-place updates, using `$set` and `$unset` to improve the performance of updates."}}