{"action":"created","comment":{"url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments/231882964","pull_request_review_id":172950514,"id":231882964,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTg4Mjk2NA==","diff_hunk":"@@ -72,14 +73,20 @@ void object_database::flush()\n {\n //   ilog(\"Save object_database in ${d}\", (\"d\", _data_dir));\n    fc::create_directories( _data_dir / \"object_database.tmp\" / \"lock\" );\n+   std::vector<fc::future<void>> tasks;\n+   tasks.reserve(200);\n    for( uint32_t space = 0; space < _index.size(); ++space )\n    {\n       fc::create_directories( _data_dir / \"object_database.tmp\" / fc::to_string(space) );\n       const auto types = _index[space].size();\n       for( uint32_t type = 0; type  <  types; ++type )\n          if( _index[space][type] )\n-            _index[space][type]->save( _data_dir / \"object_database.tmp\" / fc::to_string(space)/fc::to_string(type) );\n+            tasks.push_back( fc::do_parallel( [this,space,type] () {\n+               _index[space][type]->save( _data_dir / \"object_database.tmp\" / fc::to_string(space)/fc::to_string(type) );\n+            } ) );","path":"libraries/db/object_database.cpp","position":23,"original_position":23,"commit_id":"81f75201bfa711bb936ff568dfbb5be77c33eb97","original_commit_id":"32e9619456e4139763085538fa41d47bc76a2cf0","user":{"login":"pmconrad","id":6449255,"node_id":"MDQ6VXNlcjY0NDkyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/6449255?v=4","gravatar_id":"","url":"https://api.github.com/users/pmconrad","html_url":"https://github.com/pmconrad","followers_url":"https://api.github.com/users/pmconrad/followers","following_url":"https://api.github.com/users/pmconrad/following{/other_user}","gists_url":"https://api.github.com/users/pmconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmconrad/subscriptions","organizations_url":"https://api.github.com/users/pmconrad/orgs","repos_url":"https://api.github.com/users/pmconrad/repos","events_url":"https://api.github.com/users/pmconrad/events{/privacy}","received_events_url":"https://api.github.com/users/pmconrad/received_events","type":"User","site_admin":false},"body":"Of course disk buffer helps when writing.\r\nOn a system with a slow disk and the bare minimum of RAM you're right, parallelizing won't help - but it won't hurt either.\r\nWith sufficient buffer memory, or on a RAM-disk, parallel saving should be faster.","created_at":"2018-11-08T13:20:03Z","updated_at":"2018-11-08T13:20:03Z","html_url":"https://github.com/bitshares/bitshares-core/pull/1360#discussion_r231882964","pull_request_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments/231882964"},"html":{"href":"https://github.com/bitshares/bitshares-core/pull/1360#discussion_r231882964"},"pull_request":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360"}},"in_reply_to_id":226873743},"pull_request":{"url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360","id":220738934,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwNzM4OTM0","html_url":"https://github.com/bitshares/bitshares-core/pull/1360","diff_url":"https://github.com/bitshares/bitshares-core/pull/1360.diff","patch_url":"https://github.com/bitshares/bitshares-core/pull/1360.patch","issue_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/1360","number":1360,"state":"open","locked":false,"title":"Parallel preprocessing of blocks + transactions","user":{"login":"pmconrad","id":6449255,"node_id":"MDQ6VXNlcjY0NDkyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/6449255?v=4","gravatar_id":"","url":"https://api.github.com/users/pmconrad","html_url":"https://github.com/pmconrad","followers_url":"https://api.github.com/users/pmconrad/followers","following_url":"https://api.github.com/users/pmconrad/following{/other_user}","gists_url":"https://api.github.com/users/pmconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmconrad/subscriptions","organizations_url":"https://api.github.com/users/pmconrad/orgs","repos_url":"https://api.github.com/users/pmconrad/repos","events_url":"https://api.github.com/users/pmconrad/events{/privacy}","received_events_url":"https://api.github.com/users/pmconrad/received_events","type":"User","site_admin":false},"body":"~Work in progress, do not merge yet!~\r\n\r\nWill ~some day~ resolve #1079 insofar as it is possible without modifying consensus.\r\n\r\nThis includes the changes from #1359 . Requires https://github.com/bitshares/bitshares-fc/pull/78 .\r\n\r\nStatus: seems to be working, at least with boost-1.60. Testing.","created_at":"2018-10-05T15:23:57Z","updated_at":"2018-11-08T13:20:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"40b6cd658b203e2434e15cc50dc635eb077dab6d","assignee":{"login":"pmconrad","id":6449255,"node_id":"MDQ6VXNlcjY0NDkyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/6449255?v=4","gravatar_id":"","url":"https://api.github.com/users/pmconrad","html_url":"https://github.com/pmconrad","followers_url":"https://api.github.com/users/pmconrad/followers","following_url":"https://api.github.com/users/pmconrad/following{/other_user}","gists_url":"https://api.github.com/users/pmconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmconrad/subscriptions","organizations_url":"https://api.github.com/users/pmconrad/orgs","repos_url":"https://api.github.com/users/pmconrad/repos","events_url":"https://api.github.com/users/pmconrad/events{/privacy}","received_events_url":"https://api.github.com/users/pmconrad/received_events","type":"User","site_admin":false},"assignees":[{"login":"pmconrad","id":6449255,"node_id":"MDQ6VXNlcjY0NDkyNTU=","avatar_url":"https://avatars3.githubusercontent.com/u/6449255?v=4","gravatar_id":"","url":"https://api.github.com/users/pmconrad","html_url":"https://github.com/pmconrad","followers_url":"https://api.github.com/users/pmconrad/followers","following_url":"https://api.github.com/users/pmconrad/following{/other_user}","gists_url":"https://api.github.com/users/pmconrad/gists{/gist_id}","starred_url":"https://api.github.com/users/pmconrad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmconrad/subscriptions","organizations_url":"https://api.github.com/users/pmconrad/orgs","repos_url":"https://api.github.com/users/pmconrad/repos","events_url":"https://api.github.com/users/pmconrad/events{/privacy}","received_events_url":"https://api.github.com/users/pmconrad/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":922310393,"node_id":"MDU6TGFiZWw5MjIzMTAzOTM=","url":"https://api.github.com/repos/bitshares/bitshares-core/labels/2g%20Final%20Review","name":"2g Final Review","color":"0e8a16","default":false},{"id":892709975,"node_id":"MDU6TGFiZWw4OTI3MDk5NzU=","url":"https://api.github.com/repos/bitshares/bitshares-core/labels/3c%20Enhancement","name":"3c Enhancement","color":"b60205","default":false},{"id":892759624,"node_id":"MDU6TGFiZWw4OTI3NTk2MjQ=","url":"https://api.github.com/repos/bitshares/bitshares-core/labels/6%20Performance","name":"6 Performance","color":"5319e7","default":false}],"milestone":{"url":"https://api.github.com/repos/bitshares/bitshares-core/milestones/18","html_url":"https://github.com/bitshares/bitshares-core/milestone/18","labels_url":"https://api.github.com/repos/bitshares/bitshares-core/milestones/18/labels","id":3653311,"node_id":"MDk6TWlsZXN0b25lMzY1MzMxMQ==","number":18,"title":"201812 - Feature Release","description":"Next feature release after 201810.","creator":{"login":"abitmore","id":9946777,"node_id":"MDQ6VXNlcjk5NDY3Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/9946777?v=4","gravatar_id":"","url":"https://api.github.com/users/abitmore","html_url":"https://github.com/abitmore","followers_url":"https://api.github.com/users/abitmore/followers","following_url":"https://api.github.com/users/abitmore/following{/other_user}","gists_url":"https://api.github.com/users/abitmore/gists{/gist_id}","starred_url":"https://api.github.com/users/abitmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abitmore/subscriptions","organizations_url":"https://api.github.com/users/abitmore/orgs","repos_url":"https://api.github.com/users/abitmore/repos","events_url":"https://api.github.com/users/abitmore/events{/privacy}","received_events_url":"https://api.github.com/users/abitmore/received_events","type":"User","site_admin":false},"open_issues":16,"closed_issues":7,"state":"open","created_at":"2018-09-13T23:34:56Z","updated_at":"2018-11-06T13:01:51Z","due_on":"2018-12-13T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360/commits","review_comments_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360/comments","review_comment_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/1360/comments","statuses_url":"https://api.github.com/repos/bitshares/bitshares-core/statuses/81f75201bfa711bb936ff568dfbb5be77c33eb97","head":{"label":"bitshares:performance_opt","ref":"performance_opt","sha":"81f75201bfa711bb936ff568dfbb5be77c33eb97","user":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"repo":{"id":44123252,"node_id":"MDEwOlJlcG9zaXRvcnk0NDEyMzI1Mg==","name":"bitshares-core","full_name":"bitshares/bitshares-core","private":false,"owner":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bitshares/bitshares-core","description":"BitShares Blockchain implementation and command-line interface","fork":true,"url":"https://api.github.com/repos/bitshares/bitshares-core","forks_url":"https://api.github.com/repos/bitshares/bitshares-core/forks","keys_url":"https://api.github.com/repos/bitshares/bitshares-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitshares/bitshares-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitshares/bitshares-core/teams","hooks_url":"https://api.github.com/repos/bitshares/bitshares-core/hooks","issue_events_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/events{/number}","events_url":"https://api.github.com/repos/bitshares/bitshares-core/events","assignees_url":"https://api.github.com/repos/bitshares/bitshares-core/assignees{/user}","branches_url":"https://api.github.com/repos/bitshares/bitshares-core/branches{/branch}","tags_url":"https://api.github.com/repos/bitshares/bitshares-core/tags","blobs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitshares/bitshares-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitshares/bitshares-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitshares/bitshares-core/statuses/{sha}","languages_url":"https://api.github.com/repos/bitshares/bitshares-core/languages","stargazers_url":"https://api.github.com/repos/bitshares/bitshares-core/stargazers","contributors_url":"https://api.github.com/repos/bitshares/bitshares-core/contributors","subscribers_url":"https://api.github.com/repos/bitshares/bitshares-core/subscribers","subscription_url":"https://api.github.com/repos/bitshares/bitshares-core/subscription","commits_url":"https://api.github.com/repos/bitshares/bitshares-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitshares/bitshares-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitshares/bitshares-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitshares/bitshares-core/contents/{+path}","compare_url":"https://api.github.com/repos/bitshares/bitshares-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitshares/bitshares-core/merges","archive_url":"https://api.github.com/repos/bitshares/bitshares-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitshares/bitshares-core/downloads","issues_url":"https://api.github.com/repos/bitshares/bitshares-core/issues{/number}","pulls_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls{/number}","milestones_url":"https://api.github.com/repos/bitshares/bitshares-core/milestones{/number}","notifications_url":"https://api.github.com/repos/bitshares/bitshares-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitshares/bitshares-core/labels{/name}","releases_url":"https://api.github.com/repos/bitshares/bitshares-core/releases{/id}","deployments_url":"https://api.github.com/repos/bitshares/bitshares-core/deployments","created_at":"2015-10-12T17:36:04Z","updated_at":"2018-11-08T10:13:17Z","pushed_at":"2018-11-08T08:51:11Z","git_url":"git://github.com/bitshares/bitshares-core.git","ssh_url":"git@github.com:bitshares/bitshares-core.git","clone_url":"https://github.com/bitshares/bitshares-core.git","svn_url":"https://github.com/bitshares/bitshares-core","homepage":"https://bitshares.org/","size":22357,"stargazers_count":947,"watchers_count":947,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":439,"open_issues":263,"watchers":947,"default_branch":"master"}},"base":{"label":"bitshares:develop","ref":"develop","sha":"59105fad4fe1c0d7f3c1abf2fb7bbbf22f81fab5","user":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"repo":{"id":44123252,"node_id":"MDEwOlJlcG9zaXRvcnk0NDEyMzI1Mg==","name":"bitshares-core","full_name":"bitshares/bitshares-core","private":false,"owner":{"login":"bitshares","id":6914094,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5MTQwOTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/6914094?v=4","gravatar_id":"","url":"https://api.github.com/users/bitshares","html_url":"https://github.com/bitshares","followers_url":"https://api.github.com/users/bitshares/followers","following_url":"https://api.github.com/users/bitshares/following{/other_user}","gists_url":"https://api.github.com/users/bitshares/gists{/gist_id}","starred_url":"https://api.github.com/users/bitshares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitshares/subscriptions","organizations_url":"https://api.github.com/users/bitshares/orgs","repos_url":"https://api.github.com/users/bitshares/repos","events_url":"https://api.github.com/users/bitshares/events{/privacy}","received_events_url":"https://api.github.com/users/bitshares/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/bitshares/bitshares-core","description":"BitShares Blockchain implementation and command-line interface","fork":true,"url":"https://api.github.com/repos/bitshares/bitshares-core","forks_url":"https://api.github.com/repos/bitshares/bitshares-core/forks","keys_url":"https://api.github.com/repos/bitshares/bitshares-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitshares/bitshares-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitshares/bitshares-core/teams","hooks_url":"https://api.github.com/repos/bitshares/bitshares-core/hooks","issue_events_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/events{/number}","events_url":"https://api.github.com/repos/bitshares/bitshares-core/events","assignees_url":"https://api.github.com/repos/bitshares/bitshares-core/assignees{/user}","branches_url":"https://api.github.com/repos/bitshares/bitshares-core/branches{/branch}","tags_url":"https://api.github.com/repos/bitshares/bitshares-core/tags","blobs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitshares/bitshares-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitshares/bitshares-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitshares/bitshares-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitshares/bitshares-core/statuses/{sha}","languages_url":"https://api.github.com/repos/bitshares/bitshares-core/languages","stargazers_url":"https://api.github.com/repos/bitshares/bitshares-core/stargazers","contributors_url":"https://api.github.com/repos/bitshares/bitshares-core/contributors","subscribers_url":"https://api.github.com/repos/bitshares/bitshares-core/subscribers","subscription_url":"https://api.github.com/repos/bitshares/bitshares-core/subscription","commits_url":"https://api.github.com/repos/bitshares/bitshares-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitshares/bitshares-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitshares/bitshares-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitshares/bitshares-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitshares/bitshares-core/contents/{+path}","compare_url":"https://api.github.com/repos/bitshares/bitshares-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitshares/bitshares-core/merges","archive_url":"https://api.github.com/repos/bitshares/bitshares-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitshares/bitshares-core/downloads","issues_url":"https://api.github.com/repos/bitshares/bitshares-core/issues{/number}","pulls_url":"https://api.github.com/repos/bitshares/bitshares-core/pulls{/number}","milestones_url":"https://api.github.com/repos/bitshares/bitshares-core/milestones{/number}","notifications_url":"https://api.github.com/repos/bitshares/bitshares-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitshares/bitshares-core/labels{/name}","releases_url":"https://api.github.com/repos/bitshares/bitshares-core/releases{/id}","deployments_url":"https://api.github.com/repos/bitshares/bitshares-core/deployments","created_at":"2015-10-12T17:36:04Z","updated_at":"2018-11-08T10:13:17Z","pushed_at":"2018-11-08T08:51:11Z","git_url":"git://github.com/bitshares/bitshares-core.git","ssh_url":"git@github.com:bitshares/bitshares-core.git","clone_url":"https://github.com/bitshares/bitshares-core.git","svn_url":"https://github.com/bitshares/bitshares-core","homepage":"https://bitshares.org/","size":22357,"stargazers_count":947,"watchers_count":947,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":439,"mirror_url":null,"archived":false,"open_issues_count":263,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":439,"open_issues":263,"watchers":947,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360"},"html":{"href":"https://github.com/bitshares/bitshares-core/pull/1360"},"issue":{"href":"https://api.github.com/repos/bitshares/bitshares-core/issues/1360"},"comments":{"href":"https://api.github.com/repos/bitshares/bitshares-core/issues/1360/comments"},"review_comments":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360/comments"},"review_comment":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitshares/bitshares-core/pulls/1360/commits"},"statuses":{"href":"https://api.github.com/repos/bitshares/bitshares-core/statuses/81f75201bfa711bb936ff568dfbb5be77c33eb97"}},"author_association":"NONE"}}
{"actor":{"display_login":"pmconrad"}}