{"action":"created","issue":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/2439","repository_url":"https://api.github.com/repos/syncthing/syncthing","labels_url":"https://api.github.com/repos/syncthing/syncthing/issues/2439/labels{/name}","comments_url":"https://api.github.com/repos/syncthing/syncthing/issues/2439/comments","events_url":"https://api.github.com/repos/syncthing/syncthing/issues/2439/events","html_url":"https://github.com/syncthing/syncthing/issues/2439","id":115659142,"number":2439,"title":"Database scan/compaction at startup takes too long","user":{"login":"sgtnoodle","id":10133717,"avatar_url":"https://avatars.githubusercontent.com/u/10133717?v=3","gravatar_id":"","url":"https://api.github.com/users/sgtnoodle","html_url":"https://github.com/sgtnoodle","followers_url":"https://api.github.com/users/sgtnoodle/followers","following_url":"https://api.github.com/users/sgtnoodle/following{/other_user}","gists_url":"https://api.github.com/users/sgtnoodle/gists{/gist_id}","starred_url":"https://api.github.com/users/sgtnoodle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgtnoodle/subscriptions","organizations_url":"https://api.github.com/users/sgtnoodle/orgs","repos_url":"https://api.github.com/users/sgtnoodle/repos","events_url":"https://api.github.com/users/sgtnoodle/events{/privacy}","received_events_url":"https://api.github.com/users/sgtnoodle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syncthing/syncthing/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/syncthing/syncthing/milestones/11","html_url":"https://github.com/syncthing/syncthing/milestones/Unplanned%20(Contributions%20Welcome)","labels_url":"https://api.github.com/repos/syncthing/syncthing/milestones/11/labels","id":1479707,"number":11,"title":"Unplanned (Contributions Welcome)","description":"Issues that no-one is currently working on or has the intention to work on anytime soon. We welcome any and all help with resolving these issues.","creator":{"login":"calmh","id":125426,"avatar_url":"https://avatars.githubusercontent.com/u/125426?v=3","gravatar_id":"","url":"https://api.github.com/users/calmh","html_url":"https://github.com/calmh","followers_url":"https://api.github.com/users/calmh/followers","following_url":"https://api.github.com/users/calmh/following{/other_user}","gists_url":"https://api.github.com/users/calmh/gists{/gist_id}","starred_url":"https://api.github.com/users/calmh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calmh/subscriptions","organizations_url":"https://api.github.com/users/calmh/orgs","repos_url":"https://api.github.com/users/calmh/repos","events_url":"https://api.github.com/users/calmh/events{/privacy}","received_events_url":"https://api.github.com/users/calmh/received_events","type":"User","site_admin":false},"open_issues":145,"closed_issues":15,"state":"open","created_at":"2016-01-01T11:33:57Z","updated_at":"2016-03-06T22:07:30Z","due_on":null,"closed_at":null},"comments":11,"created_at":"2015-11-07T11:05:42Z","updated_at":"2016-03-07T01:12:42Z","closed_at":null,"body":"I'm running \"v0.12.1, Linux (ARM)\" in arch linux on a raspberry pi. After starting up syncthing, it takes several minutes before the thing actually starts listening on port 8384.\r\n\r\nI would expect syncthing to open up its listening sockets within a couple seconds of starting up.\r\n\r\n```\r\n[xxx@xxx~]$ syncthing -verbose\r\n[monitor] 10:53:21 INFO: Starting syncthing\r\n[C63OC] 10:53:21 INFO: syncthing v0.12.1 \"Beryllium Bedbug\" (go1.5.1 linux-arm default) builduser@leming 2015-11-06 16:14:20 UTC\r\n[C63OC] 10:53:21 INFO: My ID: XXX\r\n[C63OC] 10:53:21 INFO: Single thread hash performance is ~3.9 MB/s\r\n[C63OC] 10:53:21 VERBOSE: Starting up (/home/xxx/.config/syncthing)\r\n[C63OC] 10:53:21 OK: Ready to synchronize default (read-write)\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v4-1.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v4-2.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v4-3.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v6-1.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v6-2.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Using discovery server https://discovery-v6-3.syncthing.net/?id=XXX\r\n[C63OC] 10:53:21 INFO: Loading HTTPS certificate: open /home/xxx/.config/syncthing/https-cert.pem: no such file or directory\r\n[C63OC] 10:53:21 INFO: Creating new HTTPS certificate\r\n[C63OC] 10:53:21 VERBOSE: Folder \"default\" is now scanning\r\n[C63OC] 10:53:21 INFO: Completed initial scan (rw) of folder default\r\n[C63OC] 10:53:21 VERBOSE: Folder \"default\" is now idle\r\n[C63OC] 10:53:31 VERBOSE: Discovered device XXX at [{tcp://0.0.0.0:22000}]\r\n[C63OC] 10:53:31 VERBOSE: Discovered device XXX at [{tcp://0.0.0.0:22000}]\r\n[C63OC] 10:53:31 VERBOSE: Relay state changed; connected relay(s) are relay://xxx:22067/?id=XXX&pingInterval=1m0s&networkTimeout=2m0s&sessionLimitBps=1000000&globalLimitBps=2000000&statusAddr=:22070&providedBy=thirtythreeforty.\r\n[C63OC] 10:53:31 INFO: No UPnP device detected\r\n[C63OC] 10:54:31 VERBOSE: Folder \"default\" is now scanning\r\n[C63OC] 10:54:31 VERBOSE: Folder \"default\" is now idle\r\n[C63OC] 10:55:10 INFO: Device XXX is \"xxx\" at [dynamic]\r\n[C63OC] 10:55:10 VERBOSE: Startup complete\r\n[C63OC] 10:55:11 INFO: API listening on 127.0.0.1:8384\r\n[C63OC] 10:55:11 INFO: GUI URL is http://127.0.0.1:8384/\r\n[C63OC] 10:55:29 VERBOSE: Folder \"default\" is now scanning\r\n[C63OC] 10:55:29 VERBOSE: Folder \"default\" is now idle\r\n```\r\n\r\nedit: Use code blocks."},"comment":{"url":"https://api.github.com/repos/syncthing/syncthing/issues/comments/193029510","html_url":"https://github.com/syncthing/syncthing/issues/2439#issuecomment-193029510","issue_url":"https://api.github.com/repos/syncthing/syncthing/issues/2439","id":193029510,"user":{"login":"martin-rueegg","id":6409516,"avatar_url":"https://avatars.githubusercontent.com/u/6409516?v=3","gravatar_id":"","url":"https://api.github.com/users/martin-rueegg","html_url":"https://github.com/martin-rueegg","followers_url":"https://api.github.com/users/martin-rueegg/followers","following_url":"https://api.github.com/users/martin-rueegg/following{/other_user}","gists_url":"https://api.github.com/users/martin-rueegg/gists{/gist_id}","starred_url":"https://api.github.com/users/martin-rueegg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martin-rueegg/subscriptions","organizations_url":"https://api.github.com/users/martin-rueegg/orgs","repos_url":"https://api.github.com/users/martin-rueegg/repos","events_url":"https://api.github.com/users/martin-rueegg/events{/privacy}","received_events_url":"https://api.github.com/users/martin-rueegg/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T01:12:42Z","updated_at":"2016-03-07T01:12:42Z","body":"i think the order in which program routines are called do not necessarily depend on the device.\r\n\r\nthe gui could (in theory) be made available as soon as the program starts, showing limited information at first and then more details as soon as the other \"components\" come life. the list of folders and devices could be presented after reading the `config.xml`\r\n\r\n(by the way, this happens on two different machines, quite decent ones, with plenty of RAM (>=32GB) and of course multple cores. however the folders have quite huge number of files. that's probably why.)\r\n\r\nnevertheless i think it makes sense to re-enigneer the start-up sequence to make the GUI available before accepting sync-connections. and rather show a \"please wait ...\" message, than not having the port listening at all."}}