{"action":"opened","number":8,"pull_request":{"url":"https://api.github.com/repos/osh/gr-eventstream/pulls/8","id":43441459,"html_url":"https://github.com/osh/gr-eventstream/pull/8","diff_url":"https://github.com/osh/gr-eventstream/pull/8.diff","patch_url":"https://github.com/osh/gr-eventstream/pull/8.patch","issue_url":"https://api.github.com/repos/osh/gr-eventstream/issues/8","number":8,"state":"open","locked":false,"title":"Insertion sort optimizations.","user":{"login":"gr-sp","id":7341168,"avatar_url":"https://avatars.githubusercontent.com/u/7341168?v=3","gravatar_id":"","url":"https://api.github.com/users/gr-sp","html_url":"https://github.com/gr-sp","followers_url":"https://api.github.com/users/gr-sp/followers","following_url":"https://api.github.com/users/gr-sp/following{/other_user}","gists_url":"https://api.github.com/users/gr-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/gr-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr-sp/subscriptions","organizations_url":"https://api.github.com/users/gr-sp/orgs","repos_url":"https://api.github.com/users/gr-sp/repos","events_url":"https://api.github.com/users/gr-sp/events{/privacy}","received_events_url":"https://api.github.com/users/gr-sp/received_events","type":"User","site_admin":false},"body":"I updated the insertion sort algorithms for adding new events to the event_queue and for adding new event times to the live_event_times queue (in es_queue and es_sink). The original algorithm used a \"brute force\" forward search to find the insertion index for each of these insertions. This update includes 3 different methods for performing the insertion sort: forward, reverse, binary.\r\n\r\n* Forward is as before: start at the beginning and search through the list until the correct index is found and return it. (find_forward(...))\r\n* Reverse is new: start at the end and search through the list until the correct index is found and return it. (find_reverse(...))\r\n* Binary is new: start at the beginning and search through the list using a binary search pattern until the binary search is exhausted or an appropriate insertion index is found. (find_binary(...))\r\n\r\nThese new methods find the insertion indices, they do not insert into the lists. The search algorithms do not change the order of the sort they just find the appropriate insertion indices faster.\r\n\r\nThere is a new constructor parameter for es_sink that specifies the desired search behavior. The default is a binary search (SEARCH_BINARY). The binary search is really fast on random input and only slightly slower than the reverse search (SEARCH_REVERSE) on ordered input so it seems like the best general search behavior. The reverse search is really fast on ordered input. Depending on the application, events may come into the event sink block in an ordered fashion and so the reverse search may give a slight performance improvement over the binary search. The forward search (SEARCH_FORWARD) behavior is similar to the old behavior.\r\n\r\nI hooked up the new constructor parameter to the GRC block so that there is a drop-down to select the desired search behavior within GRC. The drop-down only shows up in the properties dialog and it defaults to SEARCH_BINARY.\r\n\r\nInterestingly enough, this optimization has less of an effect on low event rates and a large effect on high event rates. So, if your application isn't heavily loading the event sink block then you are not likely to see much of a performance advantage. On the flip side, if you are stressing the event sink block then you will see a very large improvement with regard to event sink performance.","created_at":"2015-08-26T19:27:18Z","updated_at":"2015-08-26T19:27:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0003d7477d01088cbcbb2188c914227b63c0c0b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osh/gr-eventstream/pulls/8/commits","review_comments_url":"https://api.github.com/repos/osh/gr-eventstream/pulls/8/comments","review_comment_url":"https://api.github.com/repos/osh/gr-eventstream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osh/gr-eventstream/issues/8/comments","statuses_url":"https://api.github.com/repos/osh/gr-eventstream/statuses/ef8c89cbc623ffa738c0a2e3515a5e9e98d7f26c","head":{"label":"gr-sp:master","ref":"master","sha":"ef8c89cbc623ffa738c0a2e3515a5e9e98d7f26c","user":{"login":"gr-sp","id":7341168,"avatar_url":"https://avatars.githubusercontent.com/u/7341168?v=3","gravatar_id":"","url":"https://api.github.com/users/gr-sp","html_url":"https://github.com/gr-sp","followers_url":"https://api.github.com/users/gr-sp/followers","following_url":"https://api.github.com/users/gr-sp/following{/other_user}","gists_url":"https://api.github.com/users/gr-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/gr-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr-sp/subscriptions","organizations_url":"https://api.github.com/users/gr-sp/orgs","repos_url":"https://api.github.com/users/gr-sp/repos","events_url":"https://api.github.com/users/gr-sp/events{/privacy}","received_events_url":"https://api.github.com/users/gr-sp/received_events","type":"User","site_admin":false},"repo":{"id":18924753,"name":"gr-eventstream","full_name":"gr-sp/gr-eventstream","owner":{"login":"gr-sp","id":7341168,"avatar_url":"https://avatars.githubusercontent.com/u/7341168?v=3","gravatar_id":"","url":"https://api.github.com/users/gr-sp","html_url":"https://github.com/gr-sp","followers_url":"https://api.github.com/users/gr-sp/followers","following_url":"https://api.github.com/users/gr-sp/following{/other_user}","gists_url":"https://api.github.com/users/gr-sp/gists{/gist_id}","starred_url":"https://api.github.com/users/gr-sp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gr-sp/subscriptions","organizations_url":"https://api.github.com/users/gr-sp/orgs","repos_url":"https://api.github.com/users/gr-sp/repos","events_url":"https://api.github.com/users/gr-sp/events{/privacy}","received_events_url":"https://api.github.com/users/gr-sp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gr-sp/gr-eventstream","description":"","fork":true,"url":"https://api.github.com/repos/gr-sp/gr-eventstream","forks_url":"https://api.github.com/repos/gr-sp/gr-eventstream/forks","keys_url":"https://api.github.com/repos/gr-sp/gr-eventstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gr-sp/gr-eventstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gr-sp/gr-eventstream/teams","hooks_url":"https://api.github.com/repos/gr-sp/gr-eventstream/hooks","issue_events_url":"https://api.github.com/repos/gr-sp/gr-eventstream/issues/events{/number}","events_url":"https://api.github.com/repos/gr-sp/gr-eventstream/events","assignees_url":"https://api.github.com/repos/gr-sp/gr-eventstream/assignees{/user}","branches_url":"https://api.github.com/repos/gr-sp/gr-eventstream/branches{/branch}","tags_url":"https://api.github.com/repos/gr-sp/gr-eventstream/tags","blobs_url":"https://api.github.com/repos/gr-sp/gr-eventstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gr-sp/gr-eventstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gr-sp/gr-eventstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/gr-sp/gr-eventstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gr-sp/gr-eventstream/statuses/{sha}","languages_url":"https://api.github.com/repos/gr-sp/gr-eventstream/languages","stargazers_url":"https://api.github.com/repos/gr-sp/gr-eventstream/stargazers","contributors_url":"https://api.github.com/repos/gr-sp/gr-eventstream/contributors","subscribers_url":"https://api.github.com/repos/gr-sp/gr-eventstream/subscribers","subscription_url":"https://api.github.com/repos/gr-sp/gr-eventstream/subscription","commits_url":"https://api.github.com/repos/gr-sp/gr-eventstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/gr-sp/gr-eventstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/gr-sp/gr-eventstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/gr-sp/gr-eventstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/gr-sp/gr-eventstream/contents/{+path}","compare_url":"https://api.github.com/repos/gr-sp/gr-eventstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gr-sp/gr-eventstream/merges","archive_url":"https://api.github.com/repos/gr-sp/gr-eventstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gr-sp/gr-eventstream/downloads","issues_url":"https://api.github.com/repos/gr-sp/gr-eventstream/issues{/number}","pulls_url":"https://api.github.com/repos/gr-sp/gr-eventstream/pulls{/number}","milestones_url":"https://api.github.com/repos/gr-sp/gr-eventstream/milestones{/number}","notifications_url":"https://api.github.com/repos/gr-sp/gr-eventstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gr-sp/gr-eventstream/labels{/name}","releases_url":"https://api.github.com/repos/gr-sp/gr-eventstream/releases{/id}","created_at":"2014-04-18T20:31:20Z","updated_at":"2015-08-13T17:39:54Z","pushed_at":"2015-08-26T18:53:22Z","git_url":"git://github.com/gr-sp/gr-eventstream.git","ssh_url":"git@github.com:gr-sp/gr-eventstream.git","clone_url":"https://github.com/gr-sp/gr-eventstream.git","svn_url":"https://github.com/gr-sp/gr-eventstream","homepage":"","size":907,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"osh:master","ref":"master","sha":"eec02d269bfb052c0a282aba7097d43cfa311cf3","user":{"login":"osh","id":850758,"avatar_url":"https://avatars.githubusercontent.com/u/850758?v=3","gravatar_id":"","url":"https://api.github.com/users/osh","html_url":"https://github.com/osh","followers_url":"https://api.github.com/users/osh/followers","following_url":"https://api.github.com/users/osh/following{/other_user}","gists_url":"https://api.github.com/users/osh/gists{/gist_id}","starred_url":"https://api.github.com/users/osh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osh/subscriptions","organizations_url":"https://api.github.com/users/osh/orgs","repos_url":"https://api.github.com/users/osh/repos","events_url":"https://api.github.com/users/osh/events{/privacy}","received_events_url":"https://api.github.com/users/osh/received_events","type":"User","site_admin":false},"repo":{"id":2390588,"name":"gr-eventstream","full_name":"osh/gr-eventstream","owner":{"login":"osh","id":850758,"avatar_url":"https://avatars.githubusercontent.com/u/850758?v=3","gravatar_id":"","url":"https://api.github.com/users/osh","html_url":"https://github.com/osh","followers_url":"https://api.github.com/users/osh/followers","following_url":"https://api.github.com/users/osh/following{/other_user}","gists_url":"https://api.github.com/users/osh/gists{/gist_id}","starred_url":"https://api.github.com/users/osh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osh/subscriptions","organizations_url":"https://api.github.com/users/osh/orgs","repos_url":"https://api.github.com/users/osh/repos","events_url":"https://api.github.com/users/osh/events{/privacy}","received_events_url":"https://api.github.com/users/osh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/osh/gr-eventstream","description":"","fork":false,"url":"https://api.github.com/repos/osh/gr-eventstream","forks_url":"https://api.github.com/repos/osh/gr-eventstream/forks","keys_url":"https://api.github.com/repos/osh/gr-eventstream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osh/gr-eventstream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osh/gr-eventstream/teams","hooks_url":"https://api.github.com/repos/osh/gr-eventstream/hooks","issue_events_url":"https://api.github.com/repos/osh/gr-eventstream/issues/events{/number}","events_url":"https://api.github.com/repos/osh/gr-eventstream/events","assignees_url":"https://api.github.com/repos/osh/gr-eventstream/assignees{/user}","branches_url":"https://api.github.com/repos/osh/gr-eventstream/branches{/branch}","tags_url":"https://api.github.com/repos/osh/gr-eventstream/tags","blobs_url":"https://api.github.com/repos/osh/gr-eventstream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osh/gr-eventstream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osh/gr-eventstream/git/refs{/sha}","trees_url":"https://api.github.com/repos/osh/gr-eventstream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osh/gr-eventstream/statuses/{sha}","languages_url":"https://api.github.com/repos/osh/gr-eventstream/languages","stargazers_url":"https://api.github.com/repos/osh/gr-eventstream/stargazers","contributors_url":"https://api.github.com/repos/osh/gr-eventstream/contributors","subscribers_url":"https://api.github.com/repos/osh/gr-eventstream/subscribers","subscription_url":"https://api.github.com/repos/osh/gr-eventstream/subscription","commits_url":"https://api.github.com/repos/osh/gr-eventstream/commits{/sha}","git_commits_url":"https://api.github.com/repos/osh/gr-eventstream/git/commits{/sha}","comments_url":"https://api.github.com/repos/osh/gr-eventstream/comments{/number}","issue_comment_url":"https://api.github.com/repos/osh/gr-eventstream/issues/comments{/number}","contents_url":"https://api.github.com/repos/osh/gr-eventstream/contents/{+path}","compare_url":"https://api.github.com/repos/osh/gr-eventstream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osh/gr-eventstream/merges","archive_url":"https://api.github.com/repos/osh/gr-eventstream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osh/gr-eventstream/downloads","issues_url":"https://api.github.com/repos/osh/gr-eventstream/issues{/number}","pulls_url":"https://api.github.com/repos/osh/gr-eventstream/pulls{/number}","milestones_url":"https://api.github.com/repos/osh/gr-eventstream/milestones{/number}","notifications_url":"https://api.github.com/repos/osh/gr-eventstream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osh/gr-eventstream/labels{/name}","releases_url":"https://api.github.com/repos/osh/gr-eventstream/releases{/id}","created_at":"2011-09-15T05:49:14Z","updated_at":"2015-08-23T20:27:42Z","pushed_at":"2015-08-26T19:27:18Z","git_url":"git://github.com/osh/gr-eventstream.git","ssh_url":"git@github.com:osh/gr-eventstream.git","clone_url":"https://github.com/osh/gr-eventstream.git","svn_url":"https://github.com/osh/gr-eventstream","homepage":"","size":1188,"stargazers_count":8,"watchers_count":8,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":1,"forks":6,"open_issues":1,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/osh/gr-eventstream/pulls/8"},"html":{"href":"https://github.com/osh/gr-eventstream/pull/8"},"issue":{"href":"https://api.github.com/repos/osh/gr-eventstream/issues/8"},"comments":{"href":"https://api.github.com/repos/osh/gr-eventstream/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/osh/gr-eventstream/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/osh/gr-eventstream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osh/gr-eventstream/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/osh/gr-eventstream/statuses/ef8c89cbc623ffa738c0a2e3515a5e9e98d7f26c"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":4,"additions":349,"deletions":72,"changed_files":8}}