{"action":"created","issue":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/445","repository_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot","labels_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/445/labels{/name}","comments_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/445/comments","events_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/445/events","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/issues/445","id":167187069,"number":445,"title":"[Suggestion & Question] Limit writes to the disk","user":{"login":"spenceryi","id":12702544,"avatar_url":"https://avatars.githubusercontent.com/u/12702544?v=3","gravatar_id":"","url":"https://api.github.com/users/spenceryi","html_url":"https://github.com/spenceryi","followers_url":"https://api.github.com/users/spenceryi/followers","following_url":"https://api.github.com/users/spenceryi/following{/other_user}","gists_url":"https://api.github.com/users/spenceryi/gists{/gist_id}","starred_url":"https://api.github.com/users/spenceryi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spenceryi/subscriptions","organizations_url":"https://api.github.com/users/spenceryi/orgs","repos_url":"https://api.github.com/users/spenceryi/repos","events_url":"https://api.github.com/users/spenceryi/events{/privacy}","received_events_url":"https://api.github.com/users/spenceryi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-23T14:41:31Z","updated_at":"2016-07-23T17:31:26Z","closed_at":null,"body":"I noticed that some JSON data files are constantly writing on the disk while the bot is running. For example, location-USERNAME.json and last-location-USERNAME.json are being written every time you take a step. This isn't much of a problem for users who are running the bot on a HDD, but this could hurt the lifespan of SSD.\r\n\r\nlast-location-USERNAME.json\r\nI haven't looked at the code deep enough but I assume last-location is used for location cacheing feature. Could the last location be saved when the bot is halted? That would save some writes.\r\n\r\nlocation-USERNAME.json\r\nInstead of constantly writing it out to the disk, could this be stored in the RAM while the bot is running? Or maybe set up refresh rate for the map so you don't have to constantly write your location out to the JSON file?\r\n"},"comment":{"url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/comments/234730189","html_url":"https://github.com/PokemonGoF/PokemonGo-Bot/issues/445#issuecomment-234730189","issue_url":"https://api.github.com/repos/PokemonGoF/PokemonGo-Bot/issues/445","id":234730189,"user":{"login":"mzupan","id":205373,"avatar_url":"https://avatars.githubusercontent.com/u/205373?v=3","gravatar_id":"","url":"https://api.github.com/users/mzupan","html_url":"https://github.com/mzupan","followers_url":"https://api.github.com/users/mzupan/followers","following_url":"https://api.github.com/users/mzupan/following{/other_user}","gists_url":"https://api.github.com/users/mzupan/gists{/gist_id}","starred_url":"https://api.github.com/users/mzupan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mzupan/subscriptions","organizations_url":"https://api.github.com/users/mzupan/orgs","repos_url":"https://api.github.com/users/mzupan/repos","events_url":"https://api.github.com/users/mzupan/events{/privacy}","received_events_url":"https://api.github.com/users/mzupan/received_events","type":"User","site_admin":false},"created_at":"2016-07-23T17:31:26Z","updated_at":"2016-07-23T17:31:26Z","body":"@Aiyubi you'll never destroy a SSD keeping this bot running for 3 years in a row"}}
{"actor":{"display_login":"mzupan"}}