{"action":"opened","number":36,"pull_request":{"url":"https://api.github.com/repos/pakastin/frzr/pulls/36","id":82630992,"html_url":"https://github.com/pakastin/frzr/pull/36","diff_url":"https://github.com/pakastin/frzr/pull/36.diff","patch_url":"https://github.com/pakastin/frzr/pull/36.patch","issue_url":"https://api.github.com/repos/pakastin/frzr/issues/36","number":36,"state":"open","locked":false,"title":"Faster mounting","user":{"login":"maciejhirsz","id":1096222,"avatar_url":"https://avatars.githubusercontent.com/u/1096222?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejhirsz","html_url":"https://github.com/maciejhirsz","followers_url":"https://api.github.com/users/maciejhirsz/followers","following_url":"https://api.github.com/users/maciejhirsz/following{/other_user}","gists_url":"https://api.github.com/users/maciejhirsz/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejhirsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejhirsz/subscriptions","organizations_url":"https://api.github.com/users/maciejhirsz/orgs","repos_url":"https://api.github.com/users/maciejhirsz/repos","events_url":"https://api.github.com/users/maciejhirsz/events{/privacy}","received_events_url":"https://api.github.com/users/maciejhirsz/received_events","type":"User","site_admin":false},"body":"- Use `child.constructor` to tests for built in types: `String`, `Number` and `Array`\r\n- Reordered to `return` early for all the types above.\r\n- Identify instances of `Node` by checking the built in [`Node#nodeType`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType) integer instead of using `instanceof`, avoiding traversing the prototype inheritance chain.\r\n- Super minor: moved `mounted` / `remounted` calls behind the check for `child` being a bare `Node`. Benefits are close to none, but the cost in complexity is zero, so why not.\r\n\r\nCode tested:\r\n\r\n```js\r\ndiv(\r\n    h1({ 'class': 'frzr' }, 'Hello ', b('FRZR'), '!'),\r\n    p('Bacon ipsum dolor amet meatloaf meatball shank porchetta \\\r\n        picanha bresaola short loin short ribs capicola fatback beef \\\r\n        ribs corned beef ham hock.')\r\n);\r\n```\r\n\r\nBefore:\r\n```\r\nBenching FRZR <div> with multiple child nodes\r\n29960ns per iteration (33377 ops/sec)\r\n```\r\n\r\nAfter:\r\n```\r\nBenching FRZR <div> with multiple child nodes\r\n13010ns per iteration (76862 ops/sec)\r\n```\r\n\r\nVanillaJS with `innerHTML` to compare:\r\n```js\r\nvar div = document.createElement('div');\r\ndiv.innerHTML = '<h1 class=\"frzr\">Hello <b>FRZR</b>!</h1>\\\r\n<p>\\\r\n    Bacon ipsum dolor amet meatloaf meatball shank porchetta \\\r\n    picanha bresaola short loin short ribs capicola fatback beef \\\r\n    ribs corned beef ham hock.\\\r\n</p>';\r\n```\r\n\r\n```\r\nBenching Vanilla JS innerHTML\r\nbuild.js:19 - 23341ns per iteration (42843 ops/sec)\r\n```\r\n\r\nTried to not add any amount of code that isn't strictly necessary, there is +9 lines but some of those are whitespace :).\r\n\r\n![](https://38.media.tumblr.com/f3a414cd6c377f8f3642c772379b93b6/tumblr_myolzvCIxu1sq0a3ho1_500.gif)","created_at":"2016-08-24T22:50:09Z","updated_at":"2016-08-24T22:50:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"feef7490241abc98c6b6654bd693350329be4c25","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pakastin/frzr/pulls/36/commits","review_comments_url":"https://api.github.com/repos/pakastin/frzr/pulls/36/comments","review_comment_url":"https://api.github.com/repos/pakastin/frzr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pakastin/frzr/issues/36/comments","statuses_url":"https://api.github.com/repos/pakastin/frzr/statuses/7077c20c049b0f99957d4938db220e4d80e2720e","head":{"label":"maciejhirsz:master","ref":"master","sha":"7077c20c049b0f99957d4938db220e4d80e2720e","user":{"login":"maciejhirsz","id":1096222,"avatar_url":"https://avatars.githubusercontent.com/u/1096222?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejhirsz","html_url":"https://github.com/maciejhirsz","followers_url":"https://api.github.com/users/maciejhirsz/followers","following_url":"https://api.github.com/users/maciejhirsz/following{/other_user}","gists_url":"https://api.github.com/users/maciejhirsz/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejhirsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejhirsz/subscriptions","organizations_url":"https://api.github.com/users/maciejhirsz/orgs","repos_url":"https://api.github.com/users/maciejhirsz/repos","events_url":"https://api.github.com/users/maciejhirsz/events{/privacy}","received_events_url":"https://api.github.com/users/maciejhirsz/received_events","type":"User","site_admin":false},"repo":{"id":66452514,"name":"frzr","full_name":"maciejhirsz/frzr","owner":{"login":"maciejhirsz","id":1096222,"avatar_url":"https://avatars.githubusercontent.com/u/1096222?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejhirsz","html_url":"https://github.com/maciejhirsz","followers_url":"https://api.github.com/users/maciejhirsz/followers","following_url":"https://api.github.com/users/maciejhirsz/following{/other_user}","gists_url":"https://api.github.com/users/maciejhirsz/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejhirsz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejhirsz/subscriptions","organizations_url":"https://api.github.com/users/maciejhirsz/orgs","repos_url":"https://api.github.com/users/maciejhirsz/repos","events_url":"https://api.github.com/users/maciejhirsz/events{/privacy}","received_events_url":"https://api.github.com/users/maciejhirsz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maciejhirsz/frzr","description":"Turboboosted 2 KB view library for browser & node.js","fork":true,"url":"https://api.github.com/repos/maciejhirsz/frzr","forks_url":"https://api.github.com/repos/maciejhirsz/frzr/forks","keys_url":"https://api.github.com/repos/maciejhirsz/frzr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maciejhirsz/frzr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maciejhirsz/frzr/teams","hooks_url":"https://api.github.com/repos/maciejhirsz/frzr/hooks","issue_events_url":"https://api.github.com/repos/maciejhirsz/frzr/issues/events{/number}","events_url":"https://api.github.com/repos/maciejhirsz/frzr/events","assignees_url":"https://api.github.com/repos/maciejhirsz/frzr/assignees{/user}","branches_url":"https://api.github.com/repos/maciejhirsz/frzr/branches{/branch}","tags_url":"https://api.github.com/repos/maciejhirsz/frzr/tags","blobs_url":"https://api.github.com/repos/maciejhirsz/frzr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maciejhirsz/frzr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maciejhirsz/frzr/git/refs{/sha}","trees_url":"https://api.github.com/repos/maciejhirsz/frzr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maciejhirsz/frzr/statuses/{sha}","languages_url":"https://api.github.com/repos/maciejhirsz/frzr/languages","stargazers_url":"https://api.github.com/repos/maciejhirsz/frzr/stargazers","contributors_url":"https://api.github.com/repos/maciejhirsz/frzr/contributors","subscribers_url":"https://api.github.com/repos/maciejhirsz/frzr/subscribers","subscription_url":"https://api.github.com/repos/maciejhirsz/frzr/subscription","commits_url":"https://api.github.com/repos/maciejhirsz/frzr/commits{/sha}","git_commits_url":"https://api.github.com/repos/maciejhirsz/frzr/git/commits{/sha}","comments_url":"https://api.github.com/repos/maciejhirsz/frzr/comments{/number}","issue_comment_url":"https://api.github.com/repos/maciejhirsz/frzr/issues/comments{/number}","contents_url":"https://api.github.com/repos/maciejhirsz/frzr/contents/{+path}","compare_url":"https://api.github.com/repos/maciejhirsz/frzr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maciejhirsz/frzr/merges","archive_url":"https://api.github.com/repos/maciejhirsz/frzr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maciejhirsz/frzr/downloads","issues_url":"https://api.github.com/repos/maciejhirsz/frzr/issues{/number}","pulls_url":"https://api.github.com/repos/maciejhirsz/frzr/pulls{/number}","milestones_url":"https://api.github.com/repos/maciejhirsz/frzr/milestones{/number}","notifications_url":"https://api.github.com/repos/maciejhirsz/frzr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maciejhirsz/frzr/labels{/name}","releases_url":"https://api.github.com/repos/maciejhirsz/frzr/releases{/id}","deployments_url":"https://api.github.com/repos/maciejhirsz/frzr/deployments","created_at":"2016-08-24T09:51:34Z","updated_at":"2016-08-24T09:51:34Z","pushed_at":"2016-08-24T22:05:24Z","git_url":"git://github.com/maciejhirsz/frzr.git","ssh_url":"git@github.com:maciejhirsz/frzr.git","clone_url":"https://github.com/maciejhirsz/frzr.git","svn_url":"https://github.com/maciejhirsz/frzr","homepage":"https://frzr.js.org","size":1284,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"pakastin:master","ref":"master","sha":"59e73283c6958fdfd365fc4731e00da09cb2eb55","user":{"login":"pakastin","id":1475902,"avatar_url":"https://avatars.githubusercontent.com/u/1475902?v=3","gravatar_id":"","url":"https://api.github.com/users/pakastin","html_url":"https://github.com/pakastin","followers_url":"https://api.github.com/users/pakastin/followers","following_url":"https://api.github.com/users/pakastin/following{/other_user}","gists_url":"https://api.github.com/users/pakastin/gists{/gist_id}","starred_url":"https://api.github.com/users/pakastin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakastin/subscriptions","organizations_url":"https://api.github.com/users/pakastin/orgs","repos_url":"https://api.github.com/users/pakastin/repos","events_url":"https://api.github.com/users/pakastin/events{/privacy}","received_events_url":"https://api.github.com/users/pakastin/received_events","type":"User","site_admin":false},"repo":{"id":31972260,"name":"frzr","full_name":"pakastin/frzr","owner":{"login":"pakastin","id":1475902,"avatar_url":"https://avatars.githubusercontent.com/u/1475902?v=3","gravatar_id":"","url":"https://api.github.com/users/pakastin","html_url":"https://github.com/pakastin","followers_url":"https://api.github.com/users/pakastin/followers","following_url":"https://api.github.com/users/pakastin/following{/other_user}","gists_url":"https://api.github.com/users/pakastin/gists{/gist_id}","starred_url":"https://api.github.com/users/pakastin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakastin/subscriptions","organizations_url":"https://api.github.com/users/pakastin/orgs","repos_url":"https://api.github.com/users/pakastin/repos","events_url":"https://api.github.com/users/pakastin/events{/privacy}","received_events_url":"https://api.github.com/users/pakastin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pakastin/frzr","description":"Turboboosted 2 KB view library for browser & node.js","fork":false,"url":"https://api.github.com/repos/pakastin/frzr","forks_url":"https://api.github.com/repos/pakastin/frzr/forks","keys_url":"https://api.github.com/repos/pakastin/frzr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pakastin/frzr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pakastin/frzr/teams","hooks_url":"https://api.github.com/repos/pakastin/frzr/hooks","issue_events_url":"https://api.github.com/repos/pakastin/frzr/issues/events{/number}","events_url":"https://api.github.com/repos/pakastin/frzr/events","assignees_url":"https://api.github.com/repos/pakastin/frzr/assignees{/user}","branches_url":"https://api.github.com/repos/pakastin/frzr/branches{/branch}","tags_url":"https://api.github.com/repos/pakastin/frzr/tags","blobs_url":"https://api.github.com/repos/pakastin/frzr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pakastin/frzr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pakastin/frzr/git/refs{/sha}","trees_url":"https://api.github.com/repos/pakastin/frzr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pakastin/frzr/statuses/{sha}","languages_url":"https://api.github.com/repos/pakastin/frzr/languages","stargazers_url":"https://api.github.com/repos/pakastin/frzr/stargazers","contributors_url":"https://api.github.com/repos/pakastin/frzr/contributors","subscribers_url":"https://api.github.com/repos/pakastin/frzr/subscribers","subscription_url":"https://api.github.com/repos/pakastin/frzr/subscription","commits_url":"https://api.github.com/repos/pakastin/frzr/commits{/sha}","git_commits_url":"https://api.github.com/repos/pakastin/frzr/git/commits{/sha}","comments_url":"https://api.github.com/repos/pakastin/frzr/comments{/number}","issue_comment_url":"https://api.github.com/repos/pakastin/frzr/issues/comments{/number}","contents_url":"https://api.github.com/repos/pakastin/frzr/contents/{+path}","compare_url":"https://api.github.com/repos/pakastin/frzr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pakastin/frzr/merges","archive_url":"https://api.github.com/repos/pakastin/frzr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pakastin/frzr/downloads","issues_url":"https://api.github.com/repos/pakastin/frzr/issues{/number}","pulls_url":"https://api.github.com/repos/pakastin/frzr/pulls{/number}","milestones_url":"https://api.github.com/repos/pakastin/frzr/milestones{/number}","notifications_url":"https://api.github.com/repos/pakastin/frzr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pakastin/frzr/labels{/name}","releases_url":"https://api.github.com/repos/pakastin/frzr/releases{/id}","deployments_url":"https://api.github.com/repos/pakastin/frzr/deployments","created_at":"2015-03-10T17:44:05Z","updated_at":"2016-08-24T15:38:40Z","pushed_at":"2016-08-24T22:50:09Z","git_url":"git://github.com/pakastin/frzr.git","ssh_url":"git@github.com:pakastin/frzr.git","clone_url":"https://github.com/pakastin/frzr.git","svn_url":"https://github.com/pakastin/frzr","homepage":"https://frzr.js.org","size":1307,"stargazers_count":224,"watchers_count":224,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":21,"mirror_url":null,"open_issues_count":2,"forks":21,"open_issues":2,"watchers":224,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pakastin/frzr/pulls/36"},"html":{"href":"https://github.com/pakastin/frzr/pull/36"},"issue":{"href":"https://api.github.com/repos/pakastin/frzr/issues/36"},"comments":{"href":"https://api.github.com/repos/pakastin/frzr/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/pakastin/frzr/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/pakastin/frzr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pakastin/frzr/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/pakastin/frzr/statuses/7077c20c049b0f99957d4938db220e4d80e2720e"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":29,"deletions":20,"changed_files":1}}
{"actor":{"display_login":"maciejhirsz"}}