{"action":"created","comment":{"url":"https://api.github.com/repos/wagn/wagn/pulls/comments/26000179","id":26000179,"diff_hunk":"@@ -23,19 +23,20 @@ def is_rule?\n end\n \n def is_standard_rule?\n-  (l = left( :skip_modules=>true ))  &&\n-  l.type_id == Card::SetID           &&\n   (r = right( :skip_modules=>true )) &&\n-  r.type_id == Card::SettingID           \n+  r.type_id == Card::SettingID       &&\n+  (l = left( :skip_modules=>true ))  &&\n+  l.type_id == Card::SetID\n end\n \n def is_user_rule?\n+  cardname.parts.length > 2                                  &&\n+  (r = right( :skip_modules=>true ))                         &&\n+   r.type_id == Card::SettingID                              &&\n   (set = self[0..-3, :skip_modules=>true])                   &&\n    set.type_id == Card::SetID                                && \n   (user = self[-2, :skip_modules=>true] )                    &&\n-  (user.type_id == Card::UserID  || user.codename == 'all' ) &&\n-  (r = right( :skip_modules=>true ))                         &&\n-   r.type_id == Card::SettingID\n+  (user.type_id == Card::UserID  || user.codename == 'all' )","path":"card/mod/01_core/set/all/rules.rb","position":23,"original_position":23,"commit_id":"8c8d697fc215f2f7838770d7a7b1bd58100c3184","original_commit_id":"8c8d697fc215f2f7838770d7a7b1bd58100c3184","user":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"body":"no real logic change here.  trying to speed it up a bit.  no real evidence yet that this is working...","created_at":"2015-03-07T22:26:09Z","updated_at":"2015-03-07T22:26:09Z","html_url":"https://github.com/wagn/wagn/pull/366#discussion_r26000179","pull_request_url":"https://api.github.com/repos/wagn/wagn/pulls/366","_links":{"self":{"href":"https://api.github.com/repos/wagn/wagn/pulls/comments/26000179"},"html":{"href":"https://github.com/wagn/wagn/pull/366#discussion_r26000179"},"pull_request":{"href":"https://api.github.com/repos/wagn/wagn/pulls/366"}}},"pull_request":{"url":"https://api.github.com/repos/wagn/wagn/pulls/366","id":30710468,"html_url":"https://github.com/wagn/wagn/pull/366","diff_url":"https://github.com/wagn/wagn/pull/366.diff","patch_url":"https://github.com/wagn/wagn/pull/366.patch","issue_url":"https://api.github.com/repos/wagn/wagn/issues/366","number":366,"state":"open","locked":false,"title":"Fastfollow","user":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"body":"the following functionality was proving to have a strong negative impact on performance in production, especially when there were lots of users with default \"created\" or \"edited\" rules.  It slowed down all card actions (as in, not simple read requests, but all the others) even in cases where there were notifications to send. \r\n\r\nThe main change here is to move most of the organization around the following tests into load time (as opposed to test time).  (see follow_option.rb)","created_at":"2015-03-07T22:24:58Z","updated_at":"2015-03-07T22:26:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c0143ba2808273e8241c990534d566036a06800","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wagn/wagn/pulls/366/commits","review_comments_url":"https://api.github.com/repos/wagn/wagn/pulls/366/comments","review_comment_url":"https://api.github.com/repos/wagn/wagn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wagn/wagn/issues/366/comments","statuses_url":"https://api.github.com/repos/wagn/wagn/statuses/8c8d697fc215f2f7838770d7a7b1bd58100c3184","head":{"label":"ethn:fastfollow","ref":"fastfollow","sha":"8c8d697fc215f2f7838770d7a7b1bd58100c3184","user":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"repo":{"id":379894,"name":"wagn","full_name":"ethn/wagn","owner":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ethn/wagn","description":"the wiki on wheels: a Ruby on Rails app for building dynamic, structured websites out of wiki cards","fork":true,"url":"https://api.github.com/repos/ethn/wagn","forks_url":"https://api.github.com/repos/ethn/wagn/forks","keys_url":"https://api.github.com/repos/ethn/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethn/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethn/wagn/teams","hooks_url":"https://api.github.com/repos/ethn/wagn/hooks","issue_events_url":"https://api.github.com/repos/ethn/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/ethn/wagn/events","assignees_url":"https://api.github.com/repos/ethn/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/ethn/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/ethn/wagn/tags","blobs_url":"https://api.github.com/repos/ethn/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethn/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethn/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethn/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethn/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/ethn/wagn/languages","stargazers_url":"https://api.github.com/repos/ethn/wagn/stargazers","contributors_url":"https://api.github.com/repos/ethn/wagn/contributors","subscribers_url":"https://api.github.com/repos/ethn/wagn/subscribers","subscription_url":"https://api.github.com/repos/ethn/wagn/subscription","commits_url":"https://api.github.com/repos/ethn/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethn/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethn/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethn/wagn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethn/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/ethn/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethn/wagn/merges","archive_url":"https://api.github.com/repos/ethn/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethn/wagn/downloads","issues_url":"https://api.github.com/repos/ethn/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/ethn/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/ethn/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/ethn/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethn/wagn/labels{/name}","releases_url":"https://api.github.com/repos/ethn/wagn/releases{/id}","created_at":"2009-11-20T19:39:26Z","updated_at":"2015-03-05T06:05:27Z","pushed_at":"2015-03-07T21:09:56Z","git_url":"git://github.com/ethn/wagn.git","ssh_url":"git@github.com:ethn/wagn.git","clone_url":"https://github.com/ethn/wagn.git","svn_url":"https://github.com/ethn/wagn","homepage":"http://www.wagn.org","size":53606,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"wagn:master","ref":"master","sha":"35efd8feb564a4db2a2d58e09cc928425813e6da","user":{"login":"wagn","id":20722,"avatar_url":"https://avatars.githubusercontent.com/u/20722?v=3","gravatar_id":"","url":"https://api.github.com/users/wagn","html_url":"https://github.com/wagn","followers_url":"https://api.github.com/users/wagn/followers","following_url":"https://api.github.com/users/wagn/following{/other_user}","gists_url":"https://api.github.com/users/wagn/gists{/gist_id}","starred_url":"https://api.github.com/users/wagn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagn/subscriptions","organizations_url":"https://api.github.com/users/wagn/orgs","repos_url":"https://api.github.com/users/wagn/repos","events_url":"https://api.github.com/users/wagn/events{/privacy}","received_events_url":"https://api.github.com/users/wagn/received_events","type":"User","site_admin":false},"repo":{"id":44462,"name":"wagn","full_name":"wagn/wagn","owner":{"login":"wagn","id":20722,"avatar_url":"https://avatars.githubusercontent.com/u/20722?v=3","gravatar_id":"","url":"https://api.github.com/users/wagn","html_url":"https://github.com/wagn","followers_url":"https://api.github.com/users/wagn/followers","following_url":"https://api.github.com/users/wagn/following{/other_user}","gists_url":"https://api.github.com/users/wagn/gists{/gist_id}","starred_url":"https://api.github.com/users/wagn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagn/subscriptions","organizations_url":"https://api.github.com/users/wagn/orgs","repos_url":"https://api.github.com/users/wagn/repos","events_url":"https://api.github.com/users/wagn/events{/privacy}","received_events_url":"https://api.github.com/users/wagn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wagn/wagn","description":"Ruby on rails wiki platform for collaborating to build custom web systems","fork":false,"url":"https://api.github.com/repos/wagn/wagn","forks_url":"https://api.github.com/repos/wagn/wagn/forks","keys_url":"https://api.github.com/repos/wagn/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wagn/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wagn/wagn/teams","hooks_url":"https://api.github.com/repos/wagn/wagn/hooks","issue_events_url":"https://api.github.com/repos/wagn/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/wagn/wagn/events","assignees_url":"https://api.github.com/repos/wagn/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/wagn/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/wagn/wagn/tags","blobs_url":"https://api.github.com/repos/wagn/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wagn/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wagn/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/wagn/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wagn/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/wagn/wagn/languages","stargazers_url":"https://api.github.com/repos/wagn/wagn/stargazers","contributors_url":"https://api.github.com/repos/wagn/wagn/contributors","subscribers_url":"https://api.github.com/repos/wagn/wagn/subscribers","subscription_url":"https://api.github.com/repos/wagn/wagn/subscription","commits_url":"https://api.github.com/repos/wagn/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/wagn/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/wagn/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/wagn/wagn/issues/comments{/number}","contents_url":"https://api.github.com/repos/wagn/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/wagn/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wagn/wagn/merges","archive_url":"https://api.github.com/repos/wagn/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wagn/wagn/downloads","issues_url":"https://api.github.com/repos/wagn/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/wagn/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/wagn/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/wagn/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wagn/wagn/labels{/name}","releases_url":"https://api.github.com/repos/wagn/wagn/releases{/id}","created_at":"2008-08-21T00:36:11Z","updated_at":"2015-03-05T06:05:28Z","pushed_at":"2015-03-05T06:05:28Z","git_url":"git://github.com/wagn/wagn.git","ssh_url":"git@github.com:wagn/wagn.git","clone_url":"https://github.com/wagn/wagn.git","svn_url":"https://github.com/wagn/wagn","homepage":"http://www.wagn.org","size":56348,"stargazers_count":247,"watchers_count":247,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":8,"forks":54,"open_issues":8,"watchers":247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wagn/wagn/pulls/366"},"html":{"href":"https://github.com/wagn/wagn/pull/366"},"issue":{"href":"https://api.github.com/repos/wagn/wagn/issues/366"},"comments":{"href":"https://api.github.com/repos/wagn/wagn/issues/366/comments"},"review_comments":{"href":"https://api.github.com/repos/wagn/wagn/pulls/366/comments"},"review_comment":{"href":"https://api.github.com/repos/wagn/wagn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wagn/wagn/pulls/366/commits"},"statuses":{"href":"https://api.github.com/repos/wagn/wagn/statuses/8c8d697fc215f2f7838770d7a7b1bd58100c3184"}}}}