{"action":"opened","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/3289","repository_url":"https://api.github.com/repos/realm/realm-cocoa","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3289/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3289/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/3289/events","html_url":"https://github.com/realm/realm-cocoa/issues/3289","id":138364385,"number":3289,"title":"add RLMRealmConfiguration.compactOnLaunch","user":{"login":"jpsim","id":474794,"avatar_url":"https://avatars.githubusercontent.com/u/474794?v=3","gravatar_id":"","url":"https://api.github.com/users/jpsim","html_url":"https://github.com/jpsim","followers_url":"https://api.github.com/users/jpsim/followers","following_url":"https://api.github.com/users/jpsim/following{/other_user}","gists_url":"https://api.github.com/users/jpsim/gists{/gist_id}","starred_url":"https://api.github.com/users/jpsim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpsim/subscriptions","organizations_url":"https://api.github.com/users/jpsim/orgs","repos_url":"https://api.github.com/users/jpsim/repos","events_url":"https://api.github.com/users/jpsim/events{/privacy}","received_events_url":"https://api.github.com/users/jpsim/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/S:Idea%20Backlog","name":"S:Idea Backlog","color":"dedede"},{"url":"https://api.github.com/repos/realm/realm-cocoa/labels/T:Enhancement","name":"T:Enhancement","color":"bfe5bf"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-04T03:17:02Z","updated_at":"2016-03-04T03:17:02Z","closed_at":null,"body":"It's common for users with large Realm files with significant amounts of unused space to want to compact them on a regular basis. The code users typically write to accomplish this is error prone due to challenges dealing with Realm instance life cycles.\r\n\r\nUnfortunately, if this option existed, it would likely be abused and used in cases in which compaction wouldn't actually reclaim much disk space. If core had a way to get a ballpark estimate of how much space could be reclaimed, this could be used to more intelligently perform compactions."}}