{"action":"created","issue":{"url":"https://api.github.com/repos/odeke-em/drive/issues/302","labels_url":"https://api.github.com/repos/odeke-em/drive/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/odeke-em/drive/issues/302/comments","events_url":"https://api.github.com/repos/odeke-em/drive/issues/302/events","html_url":"https://github.com/odeke-em/drive/issues/302","id":96960141,"number":302,"title":"[enhancement] Using boltdb's `Batch()` when updating multiple indices","user":{"login":"js-ojus","id":1468942,"avatar_url":"https://avatars.githubusercontent.com/u/1468942?v=3","gravatar_id":"","url":"https://api.github.com/users/js-ojus","html_url":"https://github.com/js-ojus","followers_url":"https://api.github.com/users/js-ojus/followers","following_url":"https://api.github.com/users/js-ojus/following{/other_user}","gists_url":"https://api.github.com/users/js-ojus/gists{/gist_id}","starred_url":"https://api.github.com/users/js-ojus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/js-ojus/subscriptions","organizations_url":"https://api.github.com/users/js-ojus/orgs","repos_url":"https://api.github.com/users/js-ojus/repos","events_url":"https://api.github.com/users/js-ojus/events{/privacy}","received_events_url":"https://api.github.com/users/js-ojus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/odeke-em/drive/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-24T04:06:21Z","updated_at":"2015-08-01T08:41:49Z","closed_at":null,"body":"Hello @odeke-em!\r\n\r\nThank you for the new release that uses boltdb for storing indices.\r\n\r\nTo test the new release (v0.2.6), I removed `.gd/indices`, and issued `drive index`.  The operation took over _one hour_ for as few as 3,651 files.\r\n\r\nLooking into the source code, I noticed (in `config/config.go`) that all index operations open and close the database for **each** index.  This is, evidently, **very** inefficient.\r\n\r\nFortunately, boltdb provides a batching operation `Batch()` to handle such scenarios.  Please look into the possibility of grouping multiple index operations."},"comment":{"url":"https://api.github.com/repos/odeke-em/drive/issues/comments/126888324","html_url":"https://github.com/odeke-em/drive/issues/302#issuecomment-126888324","issue_url":"https://api.github.com/repos/odeke-em/drive/issues/302","id":126888324,"user":{"login":"odeke-em","id":4898263,"avatar_url":"https://avatars.githubusercontent.com/u/4898263?v=3","gravatar_id":"","url":"https://api.github.com/users/odeke-em","html_url":"https://github.com/odeke-em","followers_url":"https://api.github.com/users/odeke-em/followers","following_url":"https://api.github.com/users/odeke-em/following{/other_user}","gists_url":"https://api.github.com/users/odeke-em/gists{/gist_id}","starred_url":"https://api.github.com/users/odeke-em/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odeke-em/subscriptions","organizations_url":"https://api.github.com/users/odeke-em/orgs","repos_url":"https://api.github.com/users/odeke-em/repos","events_url":"https://api.github.com/users/odeke-em/events{/privacy}","received_events_url":"https://api.github.com/users/odeke-em/received_events","type":"User","site_admin":false},"created_at":"2015-08-01T08:41:48Z","updated_at":"2015-08-01T08:41:48Z","body":"Thank you @js-ojus, that's awesome! However, would you mind creating an actual PR and this way any feedback, changes etc can be done properly. Good stuff!"}}