{"action":"created","comment":{"url":"https://api.github.com/repos/Disturbing/suice/pulls/comments/56748581","id":56748581,"diff_hunk":"@@ -0,0 +1,70 @@\n+﻿using System;\n+using System.Collections.Generic;\n+using System.Linq;\n+using System.Linq.Expressions;\n+using System.Reflection;\n+\n+/// <summary>\n+/// Got this from the following sites :\n+/// https://vagifabilov.wordpress.com/2010/04/02/dont-use-activator-createinstance-or-constructorinfo-invoke-use-compiled-lambda-expressions/\n+/// https://ayende.com/blog/3167/creating-objects-perf-implications\n+/// http://rogeralsing.com/2008/02/28/linq-expressions-creating-objects/\n+/// https://rboeije.wordpress.com/2012/04/19/extension-method-on-type-as-alternative-for-activator-createinstance/ - Implemented this\n+/// \n+/// This extension is a benchmarked better implementation to Activator.CreateInstance when taking the second link into consideration\n+/// Here the expression is further cached so as to better instantiation for factory implementations\n+/// </summary>\n+internal static class InstanceCreatorExtensions\n+{\n+    internal static object New(this Type type, params object[] args)\n+    {\n+        Type[] argTypes = args.Select(a => a.GetType()).ToArray();\n+\n+        var ctor = type.GetConstructor(argTypes);","path":"DTools/Suice/suice/Utilities/InstanceCreatorExtension.cs","position":null,"original_position":23,"commit_id":"a914e820373800f05edb6f66c4f8e42ed6e6c5cc","original_commit_id":"02675bfb75df447c7f7d4356c552f88765cb580f","user":{"login":"ChicK00o","id":5801907,"avatar_url":"https://avatars.githubusercontent.com/u/5801907?v=3","gravatar_id":"","url":"https://api.github.com/users/ChicK00o","html_url":"https://github.com/ChicK00o","followers_url":"https://api.github.com/users/ChicK00o/followers","following_url":"https://api.github.com/users/ChicK00o/following{/other_user}","gists_url":"https://api.github.com/users/ChicK00o/gists{/gist_id}","starred_url":"https://api.github.com/users/ChicK00o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChicK00o/subscriptions","organizations_url":"https://api.github.com/users/ChicK00o/orgs","repos_url":"https://api.github.com/users/ChicK00o/repos","events_url":"https://api.github.com/users/ChicK00o/events{/privacy}","received_events_url":"https://api.github.com/users/ChicK00o/received_events","type":"User","site_admin":false},"body":"My bad :)","created_at":"2016-03-19T12:41:08Z","updated_at":"2016-03-19T12:41:08Z","html_url":"https://github.com/Disturbing/suice/pull/1#discussion_r56748581","pull_request_url":"https://api.github.com/repos/Disturbing/suice/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/comments/56748581"},"html":{"href":"https://github.com/Disturbing/suice/pull/1#discussion_r56748581"},"pull_request":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/Disturbing/suice/pulls/1","id":63334197,"html_url":"https://github.com/Disturbing/suice/pull/1","diff_url":"https://github.com/Disturbing/suice/pull/1.diff","patch_url":"https://github.com/Disturbing/suice/pull/1.patch","issue_url":"https://api.github.com/repos/Disturbing/suice/issues/1","number":1,"state":"open","locked":false,"title":"Improving Performance and creation of intances","user":{"login":"ChicK00o","id":5801907,"avatar_url":"https://avatars.githubusercontent.com/u/5801907?v=3","gravatar_id":"","url":"https://api.github.com/users/ChicK00o","html_url":"https://github.com/ChicK00o","followers_url":"https://api.github.com/users/ChicK00o/followers","following_url":"https://api.github.com/users/ChicK00o/following{/other_user}","gists_url":"https://api.github.com/users/ChicK00o/gists{/gist_id}","starred_url":"https://api.github.com/users/ChicK00o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChicK00o/subscriptions","organizations_url":"https://api.github.com/users/ChicK00o/orgs","repos_url":"https://api.github.com/users/ChicK00o/repos","events_url":"https://api.github.com/users/ChicK00o/events{/privacy}","received_events_url":"https://api.github.com/users/ChicK00o/received_events","type":"User","site_admin":false},"body":"Have a look and let me know","created_at":"2016-03-18T06:46:36Z","updated_at":"2016-03-19T12:41:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5630a5ec44472808c14fd17f1f5cbd73b44385d0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Disturbing/suice/pulls/1/commits","review_comments_url":"https://api.github.com/repos/Disturbing/suice/pulls/1/comments","review_comment_url":"https://api.github.com/repos/Disturbing/suice/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Disturbing/suice/issues/1/comments","statuses_url":"https://api.github.com/repos/Disturbing/suice/statuses/a914e820373800f05edb6f66c4f8e42ed6e6c5cc","head":{"label":"ChicK00o:master","ref":"master","sha":"a914e820373800f05edb6f66c4f8e42ed6e6c5cc","user":{"login":"ChicK00o","id":5801907,"avatar_url":"https://avatars.githubusercontent.com/u/5801907?v=3","gravatar_id":"","url":"https://api.github.com/users/ChicK00o","html_url":"https://github.com/ChicK00o","followers_url":"https://api.github.com/users/ChicK00o/followers","following_url":"https://api.github.com/users/ChicK00o/following{/other_user}","gists_url":"https://api.github.com/users/ChicK00o/gists{/gist_id}","starred_url":"https://api.github.com/users/ChicK00o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChicK00o/subscriptions","organizations_url":"https://api.github.com/users/ChicK00o/orgs","repos_url":"https://api.github.com/users/ChicK00o/repos","events_url":"https://api.github.com/users/ChicK00o/events{/privacy}","received_events_url":"https://api.github.com/users/ChicK00o/received_events","type":"User","site_admin":false},"repo":{"id":39066294,"name":"suice","full_name":"ChicK00o/suice","owner":{"login":"ChicK00o","id":5801907,"avatar_url":"https://avatars.githubusercontent.com/u/5801907?v=3","gravatar_id":"","url":"https://api.github.com/users/ChicK00o","html_url":"https://github.com/ChicK00o","followers_url":"https://api.github.com/users/ChicK00o/followers","following_url":"https://api.github.com/users/ChicK00o/following{/other_user}","gists_url":"https://api.github.com/users/ChicK00o/gists{/gist_id}","starred_url":"https://api.github.com/users/ChicK00o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChicK00o/subscriptions","organizations_url":"https://api.github.com/users/ChicK00o/orgs","repos_url":"https://api.github.com/users/ChicK00o/repos","events_url":"https://api.github.com/users/ChicK00o/events{/privacy}","received_events_url":"https://api.github.com/users/ChicK00o/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ChicK00o/suice","description":"suice","fork":true,"url":"https://api.github.com/repos/ChicK00o/suice","forks_url":"https://api.github.com/repos/ChicK00o/suice/forks","keys_url":"https://api.github.com/repos/ChicK00o/suice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ChicK00o/suice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ChicK00o/suice/teams","hooks_url":"https://api.github.com/repos/ChicK00o/suice/hooks","issue_events_url":"https://api.github.com/repos/ChicK00o/suice/issues/events{/number}","events_url":"https://api.github.com/repos/ChicK00o/suice/events","assignees_url":"https://api.github.com/repos/ChicK00o/suice/assignees{/user}","branches_url":"https://api.github.com/repos/ChicK00o/suice/branches{/branch}","tags_url":"https://api.github.com/repos/ChicK00o/suice/tags","blobs_url":"https://api.github.com/repos/ChicK00o/suice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ChicK00o/suice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ChicK00o/suice/git/refs{/sha}","trees_url":"https://api.github.com/repos/ChicK00o/suice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ChicK00o/suice/statuses/{sha}","languages_url":"https://api.github.com/repos/ChicK00o/suice/languages","stargazers_url":"https://api.github.com/repos/ChicK00o/suice/stargazers","contributors_url":"https://api.github.com/repos/ChicK00o/suice/contributors","subscribers_url":"https://api.github.com/repos/ChicK00o/suice/subscribers","subscription_url":"https://api.github.com/repos/ChicK00o/suice/subscription","commits_url":"https://api.github.com/repos/ChicK00o/suice/commits{/sha}","git_commits_url":"https://api.github.com/repos/ChicK00o/suice/git/commits{/sha}","comments_url":"https://api.github.com/repos/ChicK00o/suice/comments{/number}","issue_comment_url":"https://api.github.com/repos/ChicK00o/suice/issues/comments{/number}","contents_url":"https://api.github.com/repos/ChicK00o/suice/contents/{+path}","compare_url":"https://api.github.com/repos/ChicK00o/suice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ChicK00o/suice/merges","archive_url":"https://api.github.com/repos/ChicK00o/suice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ChicK00o/suice/downloads","issues_url":"https://api.github.com/repos/ChicK00o/suice/issues{/number}","pulls_url":"https://api.github.com/repos/ChicK00o/suice/pulls{/number}","milestones_url":"https://api.github.com/repos/ChicK00o/suice/milestones{/number}","notifications_url":"https://api.github.com/repos/ChicK00o/suice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ChicK00o/suice/labels{/name}","releases_url":"https://api.github.com/repos/ChicK00o/suice/releases{/id}","deployments_url":"https://api.github.com/repos/ChicK00o/suice/deployments","created_at":"2015-07-14T09:33:18Z","updated_at":"2016-03-18T06:14:37Z","pushed_at":"2016-03-19T12:37:49Z","git_url":"git://github.com/ChicK00o/suice.git","ssh_url":"git@github.com:ChicK00o/suice.git","clone_url":"https://github.com/ChicK00o/suice.git","svn_url":"https://github.com/ChicK00o/suice","homepage":null,"size":734,"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":"Disturbing:master","ref":"master","sha":"5c7669f7091f80c87d9a9984dea0cf3d8d6c6089","user":{"login":"Disturbing","id":2367167,"avatar_url":"https://avatars.githubusercontent.com/u/2367167?v=3","gravatar_id":"","url":"https://api.github.com/users/Disturbing","html_url":"https://github.com/Disturbing","followers_url":"https://api.github.com/users/Disturbing/followers","following_url":"https://api.github.com/users/Disturbing/following{/other_user}","gists_url":"https://api.github.com/users/Disturbing/gists{/gist_id}","starred_url":"https://api.github.com/users/Disturbing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Disturbing/subscriptions","organizations_url":"https://api.github.com/users/Disturbing/orgs","repos_url":"https://api.github.com/users/Disturbing/repos","events_url":"https://api.github.com/users/Disturbing/events{/privacy}","received_events_url":"https://api.github.com/users/Disturbing/received_events","type":"User","site_admin":false},"repo":{"id":15839632,"name":"suice","full_name":"Disturbing/suice","owner":{"login":"Disturbing","id":2367167,"avatar_url":"https://avatars.githubusercontent.com/u/2367167?v=3","gravatar_id":"","url":"https://api.github.com/users/Disturbing","html_url":"https://github.com/Disturbing","followers_url":"https://api.github.com/users/Disturbing/followers","following_url":"https://api.github.com/users/Disturbing/following{/other_user}","gists_url":"https://api.github.com/users/Disturbing/gists{/gist_id}","starred_url":"https://api.github.com/users/Disturbing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Disturbing/subscriptions","organizations_url":"https://api.github.com/users/Disturbing/orgs","repos_url":"https://api.github.com/users/Disturbing/repos","events_url":"https://api.github.com/users/Disturbing/events{/privacy}","received_events_url":"https://api.github.com/users/Disturbing/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Disturbing/suice","description":"suice","fork":false,"url":"https://api.github.com/repos/Disturbing/suice","forks_url":"https://api.github.com/repos/Disturbing/suice/forks","keys_url":"https://api.github.com/repos/Disturbing/suice/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Disturbing/suice/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Disturbing/suice/teams","hooks_url":"https://api.github.com/repos/Disturbing/suice/hooks","issue_events_url":"https://api.github.com/repos/Disturbing/suice/issues/events{/number}","events_url":"https://api.github.com/repos/Disturbing/suice/events","assignees_url":"https://api.github.com/repos/Disturbing/suice/assignees{/user}","branches_url":"https://api.github.com/repos/Disturbing/suice/branches{/branch}","tags_url":"https://api.github.com/repos/Disturbing/suice/tags","blobs_url":"https://api.github.com/repos/Disturbing/suice/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Disturbing/suice/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Disturbing/suice/git/refs{/sha}","trees_url":"https://api.github.com/repos/Disturbing/suice/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Disturbing/suice/statuses/{sha}","languages_url":"https://api.github.com/repos/Disturbing/suice/languages","stargazers_url":"https://api.github.com/repos/Disturbing/suice/stargazers","contributors_url":"https://api.github.com/repos/Disturbing/suice/contributors","subscribers_url":"https://api.github.com/repos/Disturbing/suice/subscribers","subscription_url":"https://api.github.com/repos/Disturbing/suice/subscription","commits_url":"https://api.github.com/repos/Disturbing/suice/commits{/sha}","git_commits_url":"https://api.github.com/repos/Disturbing/suice/git/commits{/sha}","comments_url":"https://api.github.com/repos/Disturbing/suice/comments{/number}","issue_comment_url":"https://api.github.com/repos/Disturbing/suice/issues/comments{/number}","contents_url":"https://api.github.com/repos/Disturbing/suice/contents/{+path}","compare_url":"https://api.github.com/repos/Disturbing/suice/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Disturbing/suice/merges","archive_url":"https://api.github.com/repos/Disturbing/suice/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Disturbing/suice/downloads","issues_url":"https://api.github.com/repos/Disturbing/suice/issues{/number}","pulls_url":"https://api.github.com/repos/Disturbing/suice/pulls{/number}","milestones_url":"https://api.github.com/repos/Disturbing/suice/milestones{/number}","notifications_url":"https://api.github.com/repos/Disturbing/suice/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Disturbing/suice/labels{/name}","releases_url":"https://api.github.com/repos/Disturbing/suice/releases{/id}","deployments_url":"https://api.github.com/repos/Disturbing/suice/deployments","created_at":"2014-01-12T09:27:05Z","updated_at":"2016-01-19T14:41:04Z","pushed_at":"2016-03-19T12:37:49Z","git_url":"git://github.com/Disturbing/suice.git","ssh_url":"git@github.com:Disturbing/suice.git","clone_url":"https://github.com/Disturbing/suice.git","svn_url":"https://github.com/Disturbing/suice","homepage":null,"size":736,"stargazers_count":17,"watchers_count":17,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/1"},"html":{"href":"https://github.com/Disturbing/suice/pull/1"},"issue":{"href":"https://api.github.com/repos/Disturbing/suice/issues/1"},"comments":{"href":"https://api.github.com/repos/Disturbing/suice/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Disturbing/suice/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/Disturbing/suice/statuses/a914e820373800f05edb6f66c4f8e42ed6e6c5cc"}}}}