{"action":"closed","issue":{"url":"https://api.github.com/repos/owncloud/client/issues/2796","labels_url":"https://api.github.com/repos/owncloud/client/issues/2796/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/client/issues/2796/comments","events_url":"https://api.github.com/repos/owncloud/client/issues/2796/events","html_url":"https://github.com/owncloud/client/issues/2796","id":56947600,"number":2796,"title":"[1.8.x] Unnecessary DB queries when adding a new sync folder","user":{"login":"guruz","id":959327,"avatar_url":"https://avatars.githubusercontent.com/u/959327?v=3","gravatar_id":"","url":"https://api.github.com/users/guruz","html_url":"https://github.com/guruz","followers_url":"https://api.github.com/users/guruz/followers","following_url":"https://api.github.com/users/guruz/following{/other_user}","gists_url":"https://api.github.com/users/guruz/gists{/gist_id}","starred_url":"https://api.github.com/users/guruz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guruz/subscriptions","organizations_url":"https://api.github.com/users/guruz/orgs","repos_url":"https://api.github.com/users/guruz/repos","events_url":"https://api.github.com/users/guruz/events{/privacy}","received_events_url":"https://api.github.com/users/guruz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/client/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/owncloud/client/labels/Performance","name":"Performance","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"dragotin","id":1070214,"avatar_url":"https://avatars.githubusercontent.com/u/1070214?v=3","gravatar_id":"","url":"https://api.github.com/users/dragotin","html_url":"https://github.com/dragotin","followers_url":"https://api.github.com/users/dragotin/followers","following_url":"https://api.github.com/users/dragotin/following{/other_user}","gists_url":"https://api.github.com/users/dragotin/gists{/gist_id}","starred_url":"https://api.github.com/users/dragotin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragotin/subscriptions","organizations_url":"https://api.github.com/users/dragotin/orgs","repos_url":"https://api.github.com/users/dragotin/repos","events_url":"https://api.github.com/users/dragotin/events{/privacy}","received_events_url":"https://api.github.com/users/dragotin/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/owncloud/client/milestones/22","html_url":"https://github.com/owncloud/client/milestones/1.8.1%20-%20Bugfix","labels_url":"https://api.github.com/repos/owncloud/client/milestones/22/labels","id":965383,"number":22,"title":"1.8.1 - Bugfix","description":"Bugfix release for 1.8.0","creator":{"login":"dragotin","id":1070214,"avatar_url":"https://avatars.githubusercontent.com/u/1070214?v=3","gravatar_id":"","url":"https://api.github.com/users/dragotin","html_url":"https://github.com/dragotin","followers_url":"https://api.github.com/users/dragotin/followers","following_url":"https://api.github.com/users/dragotin/following{/other_user}","gists_url":"https://api.github.com/users/dragotin/gists{/gist_id}","starred_url":"https://api.github.com/users/dragotin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dragotin/subscriptions","organizations_url":"https://api.github.com/users/dragotin/orgs","repos_url":"https://api.github.com/users/dragotin/repos","events_url":"https://api.github.com/users/dragotin/events{/privacy}","received_events_url":"https://api.github.com/users/dragotin/received_events","type":"User","site_admin":false},"open_issues":55,"closed_issues":51,"state":"open","created_at":"2015-02-04T13:05:48Z","updated_at":"2015-04-08T10:43:09Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-02-08T10:59:38Z","updated_at":"2015-04-08T10:43:09Z","closed_at":"2015-04-08T10:43:09Z","body":"Although we know the DB has been newly created:\r\n\r\nFor local:\r\n```\r\n02-08 11:52:11:890 0x10eaf69f8 csync_walker: file: /Users/guruz/ownCloud/3rdparty/build-qtmacgoodies-Qt_desktop-Debug/.qmake.stash [inode=48364464 size=1307]\r\n02-08 11:52:11:890 0x10eaf69f8 sqlite_profile: _SQL_ SELECT * FROM metadata WHERE phash=?1: 0\r\n02-08 11:52:11:890 0x10eaf69f8 _csync_detect_update: Checking for rename based on inode # 48364464\r\n02-08 11:52:11:890 0x10eaf69f8 sqlite_profile: _SQL_ SELECT * FROM metadata WHERE inode=?1: 0\r\n02-08 11:52:11:890 0x10eaf69f8 _csync_detect_update: file: build-qtmacgoodies-Qt_desktop-Debug/.qmake.stash, instruction: INSTRUCTION_NEW <<=\r\n```\r\n\r\nFor remote:\r\n```\r\n02-08 11:52:12:762 0x10eaf69f8 csync_walker: file: ownclouds:/xxx/remote.php/webdav/3rdparty/build-qtmacgoodies-Qt_desktop-Debug/.qmake.stash [file_id=0003219650db25ada54f3 size=1307]\r\n02-08 11:52:12:762 0x10eaf69f8 sqlite_profile: _SQL_ SELECT * FROM metadata WHERE phash=?1: 0\r\n02-08 11:52:12:762 0x10eaf69f8 sqlite_profile: _SQL_ SELECT * FROM metadata WHERE fileid=?1: 0\r\n02-08 11:52:12:762 0x10eaf69f8 _csync_detect_update: file: build-qtmacgoodies-Qt_desktop-Debug/.qmake.stash, instruction: INSTRUCTION_NEW <<=\r\n```\r\n\r\nAlthough I don't know if this is in practice really a problem (maybe sqlite3 cached that the table is empty anyway?)\r\nTo test maybe one could benchmark by just removing the rename check."}}