{"action":"created","comment":{"url":"https://api.github.com/repos/greenbone/gvmd/pulls/comments/338752451","pull_request_review_id":306812227,"id":338752451,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzODc1MjQ1MQ==","diff_hunk":"@@ -15490,37 +15490,41 @@ update_nvti_cache ()\n   nvti_cache = nvtis_new ();\n \n   init_iterator (&nvts,\n-                 \"SELECT oid, name, family, cvss_base, tag, solution, solution_type FROM nvts;\");\n+                 \"SELECT nvts.oid, nvts.name, nvts.family, nvts.cvss_base,\"\n+                 \"       nvts.tag, nvts.solution, nvts.solution_type,\"\n+                 /*      7 */","path":"src/manage_sql.c","position":7,"original_position":7,"commit_id":"2e484026827f76d3e4954780a3cae4d2fce6c8aa","original_commit_id":"689cd9f8c88c1edcc7e85467ef6f16489202ad8b","user":{"login":"mattmundell","id":32057441,"node_id":"MDQ6VXNlcjMyMDU3NDQx","avatar_url":"https://avatars2.githubusercontent.com/u/32057441?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmundell","html_url":"https://github.com/mattmundell","followers_url":"https://api.github.com/users/mattmundell/followers","following_url":"https://api.github.com/users/mattmundell/following{/other_user}","gists_url":"https://api.github.com/users/mattmundell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmundell/subscriptions","organizations_url":"https://api.github.com/users/mattmundell/orgs","repos_url":"https://api.github.com/users/mattmundell/repos","events_url":"https://api.github.com/users/mattmundell/events{/privacy}","received_events_url":"https://api.github.com/users/mattmundell/received_events","type":"User","site_admin":false},"body":"Good point, done in https://github.com/greenbone/gvmd/pull/826/commits/2e484026827f76d3e4954780a3cae4d2fce6c8aa.","created_at":"2019-10-24T19:29:46Z","updated_at":"2019-10-24T19:29:46Z","html_url":"https://github.com/greenbone/gvmd/pull/826#discussion_r338752451","pull_request_url":"https://api.github.com/repos/greenbone/gvmd/pulls/826","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/comments/338752451"},"html":{"href":"https://github.com/greenbone/gvmd/pull/826#discussion_r338752451"},"pull_request":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/826"}},"in_reply_to_id":338525338},"pull_request":{"url":"https://api.github.com/repos/greenbone/gvmd/pulls/826","id":331472828,"node_id":"MDExOlB1bGxSZXF1ZXN0MzMxNDcyODI4","html_url":"https://github.com/greenbone/gvmd/pull/826","diff_url":"https://github.com/greenbone/gvmd/pull/826.diff","patch_url":"https://github.com/greenbone/gvmd/pull/826.patch","issue_url":"https://api.github.com/repos/greenbone/gvmd/issues/826","number":826,"state":"open","locked":false,"title":"Get refs in the NVT SQL when updating nvti_cache","user":{"login":"mattmundell","id":32057441,"node_id":"MDQ6VXNlcjMyMDU3NDQx","avatar_url":"https://avatars2.githubusercontent.com/u/32057441?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmundell","html_url":"https://github.com/mattmundell","followers_url":"https://api.github.com/users/mattmundell/followers","following_url":"https://api.github.com/users/mattmundell/following{/other_user}","gists_url":"https://api.github.com/users/mattmundell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmundell/subscriptions","organizations_url":"https://api.github.com/users/mattmundell/orgs","repos_url":"https://api.github.com/users/mattmundell/repos","events_url":"https://api.github.com/users/mattmundell/events{/privacy}","received_events_url":"https://api.github.com/users/mattmundell/received_events","type":"User","site_admin":false},"body":"This improves the gvmd startup time by about 10s.  Previously we ran a separate SQL statement for each NVT, to retrieve the refs.\r\n\r\nSlow gvmd startup time really frustrates me during development.\r\n\r\nI printed and diffed nvti_cache to confirm that it was the same before and after the patch.\r\n\r\n<!--\r\n  Describe what changes are being made, e.g. which feature/bug is being\r\n  developed/fixed in this PR?\r\n-->\r\n\r\n**Checklist**:\r\n\r\n<!-- add \"N/A\" to the end of each line not applicable to your changes -->\r\n\r\n<!-- to check an item, place an \"x\" in the box like so: \"- [x] Tests\" -->\r\n\r\n- [ ] Tests\r\n- [x] [CHANGELOG](https://github.com/greenbone/gvmd/blob/master/CHANGELOG.md) Entry\r\n","created_at":"2019-10-23T10:46:25Z","updated_at":"2019-10-24T19:29:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"42d8a66d86d769bcca658ff964c368e49c0c0586","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenbone/gvmd/pulls/826/commits","review_comments_url":"https://api.github.com/repos/greenbone/gvmd/pulls/826/comments","review_comment_url":"https://api.github.com/repos/greenbone/gvmd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenbone/gvmd/issues/826/comments","statuses_url":"https://api.github.com/repos/greenbone/gvmd/statuses/2e484026827f76d3e4954780a3cae4d2fce6c8aa","head":{"label":"mattmundell:faster-cache-update","ref":"faster-cache-update","sha":"2e484026827f76d3e4954780a3cae4d2fce6c8aa","user":{"login":"mattmundell","id":32057441,"node_id":"MDQ6VXNlcjMyMDU3NDQx","avatar_url":"https://avatars2.githubusercontent.com/u/32057441?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmundell","html_url":"https://github.com/mattmundell","followers_url":"https://api.github.com/users/mattmundell/followers","following_url":"https://api.github.com/users/mattmundell/following{/other_user}","gists_url":"https://api.github.com/users/mattmundell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmundell/subscriptions","organizations_url":"https://api.github.com/users/mattmundell/orgs","repos_url":"https://api.github.com/users/mattmundell/repos","events_url":"https://api.github.com/users/mattmundell/events{/privacy}","received_events_url":"https://api.github.com/users/mattmundell/received_events","type":"User","site_admin":false},"repo":{"id":119505904,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk1MDU5MDQ=","name":"gvmd","full_name":"mattmundell/gvmd","private":false,"owner":{"login":"mattmundell","id":32057441,"node_id":"MDQ6VXNlcjMyMDU3NDQx","avatar_url":"https://avatars2.githubusercontent.com/u/32057441?v=4","gravatar_id":"","url":"https://api.github.com/users/mattmundell","html_url":"https://github.com/mattmundell","followers_url":"https://api.github.com/users/mattmundell/followers","following_url":"https://api.github.com/users/mattmundell/following{/other_user}","gists_url":"https://api.github.com/users/mattmundell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattmundell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattmundell/subscriptions","organizations_url":"https://api.github.com/users/mattmundell/orgs","repos_url":"https://api.github.com/users/mattmundell/repos","events_url":"https://api.github.com/users/mattmundell/events{/privacy}","received_events_url":"https://api.github.com/users/mattmundell/received_events","type":"User","site_admin":false},"html_url":"https://github.com/mattmundell/gvmd","description":"Greenbone Vulnerability Manager","fork":true,"url":"https://api.github.com/repos/mattmundell/gvmd","forks_url":"https://api.github.com/repos/mattmundell/gvmd/forks","keys_url":"https://api.github.com/repos/mattmundell/gvmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mattmundell/gvmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mattmundell/gvmd/teams","hooks_url":"https://api.github.com/repos/mattmundell/gvmd/hooks","issue_events_url":"https://api.github.com/repos/mattmundell/gvmd/issues/events{/number}","events_url":"https://api.github.com/repos/mattmundell/gvmd/events","assignees_url":"https://api.github.com/repos/mattmundell/gvmd/assignees{/user}","branches_url":"https://api.github.com/repos/mattmundell/gvmd/branches{/branch}","tags_url":"https://api.github.com/repos/mattmundell/gvmd/tags","blobs_url":"https://api.github.com/repos/mattmundell/gvmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mattmundell/gvmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mattmundell/gvmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/mattmundell/gvmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mattmundell/gvmd/statuses/{sha}","languages_url":"https://api.github.com/repos/mattmundell/gvmd/languages","stargazers_url":"https://api.github.com/repos/mattmundell/gvmd/stargazers","contributors_url":"https://api.github.com/repos/mattmundell/gvmd/contributors","subscribers_url":"https://api.github.com/repos/mattmundell/gvmd/subscribers","subscription_url":"https://api.github.com/repos/mattmundell/gvmd/subscription","commits_url":"https://api.github.com/repos/mattmundell/gvmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/mattmundell/gvmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/mattmundell/gvmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/mattmundell/gvmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/mattmundell/gvmd/contents/{+path}","compare_url":"https://api.github.com/repos/mattmundell/gvmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mattmundell/gvmd/merges","archive_url":"https://api.github.com/repos/mattmundell/gvmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mattmundell/gvmd/downloads","issues_url":"https://api.github.com/repos/mattmundell/gvmd/issues{/number}","pulls_url":"https://api.github.com/repos/mattmundell/gvmd/pulls{/number}","milestones_url":"https://api.github.com/repos/mattmundell/gvmd/milestones{/number}","notifications_url":"https://api.github.com/repos/mattmundell/gvmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mattmundell/gvmd/labels{/name}","releases_url":"https://api.github.com/repos/mattmundell/gvmd/releases{/id}","deployments_url":"https://api.github.com/repos/mattmundell/gvmd/deployments","created_at":"2018-01-30T08:28:27Z","updated_at":"2019-10-01T10:27:57Z","pushed_at":"2019-10-24T19:28:38Z","git_url":"git://github.com/mattmundell/gvmd.git","ssh_url":"git@github.com:mattmundell/gvmd.git","clone_url":"https://github.com/mattmundell/gvmd.git","svn_url":"https://github.com/mattmundell/gvmd","homepage":null,"size":48735,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"greenbone:master","ref":"master","sha":"3a8cd38ddb078b9891700463d95a762e7e7b2f40","user":{"login":"greenbone","id":31986857,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTg2ODU3","avatar_url":"https://avatars1.githubusercontent.com/u/31986857?v=4","gravatar_id":"","url":"https://api.github.com/users/greenbone","html_url":"https://github.com/greenbone","followers_url":"https://api.github.com/users/greenbone/followers","following_url":"https://api.github.com/users/greenbone/following{/other_user}","gists_url":"https://api.github.com/users/greenbone/gists{/gist_id}","starred_url":"https://api.github.com/users/greenbone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenbone/subscriptions","organizations_url":"https://api.github.com/users/greenbone/orgs","repos_url":"https://api.github.com/users/greenbone/repos","events_url":"https://api.github.com/users/greenbone/events{/privacy}","received_events_url":"https://api.github.com/users/greenbone/received_events","type":"Organization","site_admin":false},"repo":{"id":119246961,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkyNDY5NjE=","name":"gvmd","full_name":"greenbone/gvmd","private":false,"owner":{"login":"greenbone","id":31986857,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMxOTg2ODU3","avatar_url":"https://avatars1.githubusercontent.com/u/31986857?v=4","gravatar_id":"","url":"https://api.github.com/users/greenbone","html_url":"https://github.com/greenbone","followers_url":"https://api.github.com/users/greenbone/followers","following_url":"https://api.github.com/users/greenbone/following{/other_user}","gists_url":"https://api.github.com/users/greenbone/gists{/gist_id}","starred_url":"https://api.github.com/users/greenbone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenbone/subscriptions","organizations_url":"https://api.github.com/users/greenbone/orgs","repos_url":"https://api.github.com/users/greenbone/repos","events_url":"https://api.github.com/users/greenbone/events{/privacy}","received_events_url":"https://api.github.com/users/greenbone/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/greenbone/gvmd","description":"Greenbone Vulnerability Manager","fork":false,"url":"https://api.github.com/repos/greenbone/gvmd","forks_url":"https://api.github.com/repos/greenbone/gvmd/forks","keys_url":"https://api.github.com/repos/greenbone/gvmd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenbone/gvmd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenbone/gvmd/teams","hooks_url":"https://api.github.com/repos/greenbone/gvmd/hooks","issue_events_url":"https://api.github.com/repos/greenbone/gvmd/issues/events{/number}","events_url":"https://api.github.com/repos/greenbone/gvmd/events","assignees_url":"https://api.github.com/repos/greenbone/gvmd/assignees{/user}","branches_url":"https://api.github.com/repos/greenbone/gvmd/branches{/branch}","tags_url":"https://api.github.com/repos/greenbone/gvmd/tags","blobs_url":"https://api.github.com/repos/greenbone/gvmd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenbone/gvmd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenbone/gvmd/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenbone/gvmd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenbone/gvmd/statuses/{sha}","languages_url":"https://api.github.com/repos/greenbone/gvmd/languages","stargazers_url":"https://api.github.com/repos/greenbone/gvmd/stargazers","contributors_url":"https://api.github.com/repos/greenbone/gvmd/contributors","subscribers_url":"https://api.github.com/repos/greenbone/gvmd/subscribers","subscription_url":"https://api.github.com/repos/greenbone/gvmd/subscription","commits_url":"https://api.github.com/repos/greenbone/gvmd/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenbone/gvmd/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenbone/gvmd/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenbone/gvmd/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenbone/gvmd/contents/{+path}","compare_url":"https://api.github.com/repos/greenbone/gvmd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenbone/gvmd/merges","archive_url":"https://api.github.com/repos/greenbone/gvmd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenbone/gvmd/downloads","issues_url":"https://api.github.com/repos/greenbone/gvmd/issues{/number}","pulls_url":"https://api.github.com/repos/greenbone/gvmd/pulls{/number}","milestones_url":"https://api.github.com/repos/greenbone/gvmd/milestones{/number}","notifications_url":"https://api.github.com/repos/greenbone/gvmd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenbone/gvmd/labels{/name}","releases_url":"https://api.github.com/repos/greenbone/gvmd/releases{/id}","deployments_url":"https://api.github.com/repos/greenbone/gvmd/deployments","created_at":"2018-01-28T10:03:23Z","updated_at":"2019-10-21T12:42:42Z","pushed_at":"2019-10-24T19:28:40Z","git_url":"git://github.com/greenbone/gvmd.git","ssh_url":"git@github.com:greenbone/gvmd.git","clone_url":"https://github.com/greenbone/gvmd.git","svn_url":"https://github.com/greenbone/gvmd","homepage":null,"size":49316,"stargazers_count":70,"watchers_count":70,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":50,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":53,"open_issues":50,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/826"},"html":{"href":"https://github.com/greenbone/gvmd/pull/826"},"issue":{"href":"https://api.github.com/repos/greenbone/gvmd/issues/826"},"comments":{"href":"https://api.github.com/repos/greenbone/gvmd/issues/826/comments"},"review_comments":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/826/comments"},"review_comment":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenbone/gvmd/pulls/826/commits"},"statuses":{"href":"https://api.github.com/repos/greenbone/gvmd/statuses/2e484026827f76d3e4954780a3cae4d2fce6c8aa"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mattmundell"}}