{"action":"created","comment":{"url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/comments/49166616","id":49166616,"diff_hunk":"@@ -235,7 +240,20 @@ public Icon transform(Object obj) {\n                 } else {\n                     configured = componentBuilder.isConfigured(false);\n                 }\n-                return IconUtils.getDescriptorIcon(descriptor, configured, IconUtils.ICON_SIZE_LARGE);\n+\n+                Icon descriptorIcon = IconUtils.getDescriptorIcon(descriptor, configured, IconUtils.ICON_SIZE_LARGE);\n+\n+                if (descriptor instanceof RemoteTransformerDescriptorImpl) {\n+                    Map<DescriptorProvider, DescriptorProviderStatus> actualDescriptorProviderStatusMap  = componentBuilder.getAnalysisJobBuilder().getConfiguration().getEnvironment().getDescriptorProvider().getActualStatusMap();","path":"desktop/ui/src/main/java/org/datacleaner/widgets/visualization/JobGraphTransformers.java","position":40,"original_position":40,"commit_id":"af994cfccd6dadf9459e158f724fb187fb0440e1","original_commit_id":"af994cfccd6dadf9459e158f724fb187fb0440e1","user":{"login":"kaspersorensen","id":291450,"avatar_url":"https://avatars.githubusercontent.com/u/291450?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspersorensen","html_url":"https://github.com/kaspersorensen","followers_url":"https://api.github.com/users/kaspersorensen/followers","following_url":"https://api.github.com/users/kaspersorensen/following{/other_user}","gists_url":"https://api.github.com/users/kaspersorensen/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspersorensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspersorensen/subscriptions","organizations_url":"https://api.github.com/users/kaspersorensen/orgs","repos_url":"https://api.github.com/users/kaspersorensen/repos","events_url":"https://api.github.com/users/kaspersorensen/events{/privacy}","received_events_url":"https://api.github.com/users/kaspersorensen/received_events","type":"User","site_admin":false},"body":"OK so this answers what the method is used for - but unfortunately also confirms why it's not so good.\r\n\r\nThis method (```Icon transform(Object)```) is invoked for _every_ change in the graph and for _every_ component on it - even just a move of a node to a new position or whatever. So having to traverse through descriptors, maps and states is maybe a small operation, but you're going to do it again and again and again. This can make our UX become quite slow and annoying.\r\n\r\nWhich is why a listener approach is much better. When a change is detected (by some background process) - update something. In this case I would suggest to have a listener that is aware of which descriptor providers are in error state. That way you will essentially have something like ```Set<ComponentDescriptor> errorStateDescriptors``` which you can do a single check in: ```if (errorStateDescriptors.contains(descriptor) { addErrorOverlay(icon); }```.","created_at":"2016-01-08T08:26:53Z","updated_at":"2016-01-08T08:26:53Z","html_url":"https://github.com/datacleaner/DataCleaner/pull/1039#discussion_r49166616","pull_request_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039","_links":{"self":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/comments/49166616"},"html":{"href":"https://github.com/datacleaner/DataCleaner/pull/1039#discussion_r49166616"},"pull_request":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039"}}},"pull_request":{"url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039","id":55432875,"html_url":"https://github.com/datacleaner/DataCleaner/pull/1039","diff_url":"https://github.com/datacleaner/DataCleaner/pull/1039.diff","patch_url":"https://github.com/datacleaner/DataCleaner/pull/1039.patch","issue_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/1039","number":1039,"state":"open","locked":false,"title":"Bug/963 remote servers problem notifications","user":{"login":"khouzvicka","id":13237018,"avatar_url":"https://avatars.githubusercontent.com/u/13237018?v=3","gravatar_id":"","url":"https://api.github.com/users/khouzvicka","html_url":"https://github.com/khouzvicka","followers_url":"https://api.github.com/users/khouzvicka/followers","following_url":"https://api.github.com/users/khouzvicka/following{/other_user}","gists_url":"https://api.github.com/users/khouzvicka/gists{/gist_id}","starred_url":"https://api.github.com/users/khouzvicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khouzvicka/subscriptions","organizations_url":"https://api.github.com/users/khouzvicka/orgs","repos_url":"https://api.github.com/users/khouzvicka/repos","events_url":"https://api.github.com/users/khouzvicka/events{/privacy}","received_events_url":"https://api.github.com/users/khouzvicka/received_events","type":"User","site_admin":false},"body":"Fix of notification center","created_at":"2016-01-08T07:38:00Z","updated_at":"2016-01-08T08:26:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6e3e92276479d31d56dd6d24058e211051228952","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039/commits","review_comments_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039/comments","review_comment_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/1039/comments","statuses_url":"https://api.github.com/repos/datacleaner/DataCleaner/statuses/af994cfccd6dadf9459e158f724fb187fb0440e1","head":{"label":"datacleaner:bug/963-remote-servers-problem-notifications","ref":"bug/963-remote-servers-problem-notifications","sha":"af994cfccd6dadf9459e158f724fb187fb0440e1","user":{"login":"datacleaner","id":1665195,"avatar_url":"https://avatars.githubusercontent.com/u/1665195?v=3","gravatar_id":"","url":"https://api.github.com/users/datacleaner","html_url":"https://github.com/datacleaner","followers_url":"https://api.github.com/users/datacleaner/followers","following_url":"https://api.github.com/users/datacleaner/following{/other_user}","gists_url":"https://api.github.com/users/datacleaner/gists{/gist_id}","starred_url":"https://api.github.com/users/datacleaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacleaner/subscriptions","organizations_url":"https://api.github.com/users/datacleaner/orgs","repos_url":"https://api.github.com/users/datacleaner/repos","events_url":"https://api.github.com/users/datacleaner/events{/privacy}","received_events_url":"https://api.github.com/users/datacleaner/received_events","type":"Organization","site_admin":false},"repo":{"id":17034809,"name":"DataCleaner","full_name":"datacleaner/DataCleaner","owner":{"login":"datacleaner","id":1665195,"avatar_url":"https://avatars.githubusercontent.com/u/1665195?v=3","gravatar_id":"","url":"https://api.github.com/users/datacleaner","html_url":"https://github.com/datacleaner","followers_url":"https://api.github.com/users/datacleaner/followers","following_url":"https://api.github.com/users/datacleaner/following{/other_user}","gists_url":"https://api.github.com/users/datacleaner/gists{/gist_id}","starred_url":"https://api.github.com/users/datacleaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacleaner/subscriptions","organizations_url":"https://api.github.com/users/datacleaner/orgs","repos_url":"https://api.github.com/users/datacleaner/repos","events_url":"https://api.github.com/users/datacleaner/events{/privacy}","received_events_url":"https://api.github.com/users/datacleaner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datacleaner/DataCleaner","description":"The premier open source Data Quality solution","fork":false,"url":"https://api.github.com/repos/datacleaner/DataCleaner","forks_url":"https://api.github.com/repos/datacleaner/DataCleaner/forks","keys_url":"https://api.github.com/repos/datacleaner/DataCleaner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datacleaner/DataCleaner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datacleaner/DataCleaner/teams","hooks_url":"https://api.github.com/repos/datacleaner/DataCleaner/hooks","issue_events_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/events{/number}","events_url":"https://api.github.com/repos/datacleaner/DataCleaner/events","assignees_url":"https://api.github.com/repos/datacleaner/DataCleaner/assignees{/user}","branches_url":"https://api.github.com/repos/datacleaner/DataCleaner/branches{/branch}","tags_url":"https://api.github.com/repos/datacleaner/DataCleaner/tags","blobs_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/refs{/sha}","trees_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datacleaner/DataCleaner/statuses/{sha}","languages_url":"https://api.github.com/repos/datacleaner/DataCleaner/languages","stargazers_url":"https://api.github.com/repos/datacleaner/DataCleaner/stargazers","contributors_url":"https://api.github.com/repos/datacleaner/DataCleaner/contributors","subscribers_url":"https://api.github.com/repos/datacleaner/DataCleaner/subscribers","subscription_url":"https://api.github.com/repos/datacleaner/DataCleaner/subscription","commits_url":"https://api.github.com/repos/datacleaner/DataCleaner/commits{/sha}","git_commits_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/commits{/sha}","comments_url":"https://api.github.com/repos/datacleaner/DataCleaner/comments{/number}","issue_comment_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/comments{/number}","contents_url":"https://api.github.com/repos/datacleaner/DataCleaner/contents/{+path}","compare_url":"https://api.github.com/repos/datacleaner/DataCleaner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datacleaner/DataCleaner/merges","archive_url":"https://api.github.com/repos/datacleaner/DataCleaner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datacleaner/DataCleaner/downloads","issues_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues{/number}","pulls_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls{/number}","milestones_url":"https://api.github.com/repos/datacleaner/DataCleaner/milestones{/number}","notifications_url":"https://api.github.com/repos/datacleaner/DataCleaner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datacleaner/DataCleaner/labels{/name}","releases_url":"https://api.github.com/repos/datacleaner/DataCleaner/releases{/id}","created_at":"2014-02-20T20:37:25Z","updated_at":"2015-11-30T13:57:04Z","pushed_at":"2016-01-08T07:38:00Z","git_url":"git://github.com/datacleaner/DataCleaner.git","ssh_url":"git@github.com:datacleaner/DataCleaner.git","clone_url":"https://github.com/datacleaner/DataCleaner.git","svn_url":"https://github.com/datacleaner/DataCleaner","homepage":null,"size":163315,"stargazers_count":45,"watchers_count":45,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":139,"forks":28,"open_issues":139,"watchers":45,"default_branch":"master"}},"base":{"label":"datacleaner:master","ref":"master","sha":"fc4784d5a34a4809c4623da86771b14fc8941742","user":{"login":"datacleaner","id":1665195,"avatar_url":"https://avatars.githubusercontent.com/u/1665195?v=3","gravatar_id":"","url":"https://api.github.com/users/datacleaner","html_url":"https://github.com/datacleaner","followers_url":"https://api.github.com/users/datacleaner/followers","following_url":"https://api.github.com/users/datacleaner/following{/other_user}","gists_url":"https://api.github.com/users/datacleaner/gists{/gist_id}","starred_url":"https://api.github.com/users/datacleaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacleaner/subscriptions","organizations_url":"https://api.github.com/users/datacleaner/orgs","repos_url":"https://api.github.com/users/datacleaner/repos","events_url":"https://api.github.com/users/datacleaner/events{/privacy}","received_events_url":"https://api.github.com/users/datacleaner/received_events","type":"Organization","site_admin":false},"repo":{"id":17034809,"name":"DataCleaner","full_name":"datacleaner/DataCleaner","owner":{"login":"datacleaner","id":1665195,"avatar_url":"https://avatars.githubusercontent.com/u/1665195?v=3","gravatar_id":"","url":"https://api.github.com/users/datacleaner","html_url":"https://github.com/datacleaner","followers_url":"https://api.github.com/users/datacleaner/followers","following_url":"https://api.github.com/users/datacleaner/following{/other_user}","gists_url":"https://api.github.com/users/datacleaner/gists{/gist_id}","starred_url":"https://api.github.com/users/datacleaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datacleaner/subscriptions","organizations_url":"https://api.github.com/users/datacleaner/orgs","repos_url":"https://api.github.com/users/datacleaner/repos","events_url":"https://api.github.com/users/datacleaner/events{/privacy}","received_events_url":"https://api.github.com/users/datacleaner/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datacleaner/DataCleaner","description":"The premier open source Data Quality solution","fork":false,"url":"https://api.github.com/repos/datacleaner/DataCleaner","forks_url":"https://api.github.com/repos/datacleaner/DataCleaner/forks","keys_url":"https://api.github.com/repos/datacleaner/DataCleaner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datacleaner/DataCleaner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datacleaner/DataCleaner/teams","hooks_url":"https://api.github.com/repos/datacleaner/DataCleaner/hooks","issue_events_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/events{/number}","events_url":"https://api.github.com/repos/datacleaner/DataCleaner/events","assignees_url":"https://api.github.com/repos/datacleaner/DataCleaner/assignees{/user}","branches_url":"https://api.github.com/repos/datacleaner/DataCleaner/branches{/branch}","tags_url":"https://api.github.com/repos/datacleaner/DataCleaner/tags","blobs_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/refs{/sha}","trees_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datacleaner/DataCleaner/statuses/{sha}","languages_url":"https://api.github.com/repos/datacleaner/DataCleaner/languages","stargazers_url":"https://api.github.com/repos/datacleaner/DataCleaner/stargazers","contributors_url":"https://api.github.com/repos/datacleaner/DataCleaner/contributors","subscribers_url":"https://api.github.com/repos/datacleaner/DataCleaner/subscribers","subscription_url":"https://api.github.com/repos/datacleaner/DataCleaner/subscription","commits_url":"https://api.github.com/repos/datacleaner/DataCleaner/commits{/sha}","git_commits_url":"https://api.github.com/repos/datacleaner/DataCleaner/git/commits{/sha}","comments_url":"https://api.github.com/repos/datacleaner/DataCleaner/comments{/number}","issue_comment_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues/comments{/number}","contents_url":"https://api.github.com/repos/datacleaner/DataCleaner/contents/{+path}","compare_url":"https://api.github.com/repos/datacleaner/DataCleaner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datacleaner/DataCleaner/merges","archive_url":"https://api.github.com/repos/datacleaner/DataCleaner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datacleaner/DataCleaner/downloads","issues_url":"https://api.github.com/repos/datacleaner/DataCleaner/issues{/number}","pulls_url":"https://api.github.com/repos/datacleaner/DataCleaner/pulls{/number}","milestones_url":"https://api.github.com/repos/datacleaner/DataCleaner/milestones{/number}","notifications_url":"https://api.github.com/repos/datacleaner/DataCleaner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datacleaner/DataCleaner/labels{/name}","releases_url":"https://api.github.com/repos/datacleaner/DataCleaner/releases{/id}","created_at":"2014-02-20T20:37:25Z","updated_at":"2015-11-30T13:57:04Z","pushed_at":"2016-01-08T07:38:00Z","git_url":"git://github.com/datacleaner/DataCleaner.git","ssh_url":"git@github.com:datacleaner/DataCleaner.git","clone_url":"https://github.com/datacleaner/DataCleaner.git","svn_url":"https://github.com/datacleaner/DataCleaner","homepage":null,"size":163315,"stargazers_count":45,"watchers_count":45,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":139,"forks":28,"open_issues":139,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039"},"html":{"href":"https://github.com/datacleaner/DataCleaner/pull/1039"},"issue":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/issues/1039"},"comments":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/issues/1039/comments"},"review_comments":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039/comments"},"review_comment":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/pulls/1039/commits"},"statuses":{"href":"https://api.github.com/repos/datacleaner/DataCleaner/statuses/af994cfccd6dadf9459e158f724fb187fb0440e1"}}}}