{"action":"created","comment":{"url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/comments/360425416","pull_request_review_id":335327351,"id":360425416,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MDQyNTQxNg==","diff_hunk":"@@ -337,25 +346,33 @@ extension DIContainer {\n           let many = parameter.parsedType.hasMany\n           for subcomponent in filtered {\n             var stack = stack\n-            stack.append((subcomponent, initial, cycle || parameter.parsedType.hasDelayed, many))\n-            dfs(for: subcomponent, visited: visited, stack: stack)\n+            stack.append((subcomponent, initial, cycle || parameter.parsedType.hasDelayed, many, parameter.parsedType.hasDelayed))\n+            processUsingDFS(node: subcomponent, visited: visited, stack: stack)\n           }\n         }\n-      }\n-      \n-      if let initial = component.initial {\n-        callDfs(by: initial.parameters, initial: true, cycle: false)\n-      }\n-      \n-      for injection in component.injections {\n-        callDfs(by: injection.signature.parameters, initial: false, cycle: injection.cycle)\n+        \n+        if let initial = component.initial {\n+          for parameter in initial.parameters {\n+            processParameter(parameter, initial: true, cycle: false)\n+          }\n+        }\n+        \n+        for injection in component.injections {\n+          for parameter in injection.signature.parameters {\n+            processParameter(parameter, initial: false, cycle: injection.cycle)\n+          }\n+          \n+        }\n       }\n     }\n     \n     \n     for component in components {\n-      let stack = [(component, false, false, false)]\n-      dfs(for: component, visited: [], stack: stack)\n+      if globalVisited.contains(component) {","path":"Sources/DITranquillity/Public/DIContainer.swift","position":119,"original_position":119,"commit_id":"451792e9d767984453d66c5262f197ea94838cb8","original_commit_id":"451792e9d767984453d66c5262f197ea94838cb8","user":{"login":"ivlevAstef","id":5517599,"node_id":"MDQ6VXNlcjU1MTc1OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5517599?v=4","gravatar_id":"","url":"https://api.github.com/users/ivlevAstef","html_url":"https://github.com/ivlevAstef","followers_url":"https://api.github.com/users/ivlevAstef/followers","following_url":"https://api.github.com/users/ivlevAstef/following{/other_user}","gists_url":"https://api.github.com/users/ivlevAstef/gists{/gist_id}","starred_url":"https://api.github.com/users/ivlevAstef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivlevAstef/subscriptions","organizations_url":"https://api.github.com/users/ivlevAstef/orgs","repos_url":"https://api.github.com/users/ivlevAstef/repos","events_url":"https://api.github.com/users/ivlevAstef/events{/privacy}","received_events_url":"https://api.github.com/users/ivlevAstef/received_events","type":"User","site_admin":false},"body":"как я написал в чат - запоминать посещенные вершины глобально не вариант, в силу наличия времени жизни.\r\n\r\nТам бесспорно как-то можно упростить, и какие-то пройденные вершины можно второй раз не рассматривать, но там нужно думать.\r\n\r\nСкорей всего я вместе в рефакторингом ядра задумаюсь об этом - мне в любом случае надо пересматривать подход получения объекта - там есть намного более оптимальные варианты как по скорости, так и по количеству кода, а главное более универсальные.","created_at":"2019-12-20T15:38:35Z","updated_at":"2019-12-20T15:38:35Z","html_url":"https://github.com/ivlevAstef/DITranquillity/pull/152#discussion_r360425416","pull_request_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/comments/360425416"},"html":{"href":"https://github.com/ivlevAstef/DITranquillity/pull/152#discussion_r360425416"},"pull_request":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152","id":355678389,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU1Njc4Mzg5","html_url":"https://github.com/ivlevAstef/DITranquillity/pull/152","diff_url":"https://github.com/ivlevAstef/DITranquillity/pull/152.diff","patch_url":"https://github.com/ivlevAstef/DITranquillity/pull/152.patch","issue_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/152","number":152,"state":"open","locked":false,"title":"Rewrite checkGraphCycles","user":{"login":"Nekitosss","id":17741730,"node_id":"MDQ6VXNlcjE3NzQxNzMw","avatar_url":"https://avatars3.githubusercontent.com/u/17741730?v=4","gravatar_id":"","url":"https://api.github.com/users/Nekitosss","html_url":"https://github.com/Nekitosss","followers_url":"https://api.github.com/users/Nekitosss/followers","following_url":"https://api.github.com/users/Nekitosss/following{/other_user}","gists_url":"https://api.github.com/users/Nekitosss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nekitosss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nekitosss/subscriptions","organizations_url":"https://api.github.com/users/Nekitosss/orgs","repos_url":"https://api.github.com/users/Nekitosss/repos","events_url":"https://api.github.com/users/Nekitosss/events{/privacy}","received_events_url":"https://api.github.com/users/Nekitosss/received_events","type":"User","site_admin":false},"body":"Speed up:\r\nOld large graph cycle check time: 543.079 sec\r\nNew, same graph: 55.283 sec\r\n\r\nReduce cycles in logs: currently cycles could show in logs not once (2,3, etc. times). Now single graph will be showed once","created_at":"2019-12-20T10:53:51Z","updated_at":"2019-12-20T15:38:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b56fce8604c48cc58182ea422f0138cf169805b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152/commits","review_comments_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152/comments","review_comment_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/152/comments","statuses_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/statuses/451792e9d767984453d66c5262f197ea94838cb8","head":{"label":"Nekitosss:feature/speed-up-cycle-validation","ref":"feature/speed-up-cycle-validation","sha":"451792e9d767984453d66c5262f197ea94838cb8","user":{"login":"Nekitosss","id":17741730,"node_id":"MDQ6VXNlcjE3NzQxNzMw","avatar_url":"https://avatars3.githubusercontent.com/u/17741730?v=4","gravatar_id":"","url":"https://api.github.com/users/Nekitosss","html_url":"https://github.com/Nekitosss","followers_url":"https://api.github.com/users/Nekitosss/followers","following_url":"https://api.github.com/users/Nekitosss/following{/other_user}","gists_url":"https://api.github.com/users/Nekitosss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nekitosss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nekitosss/subscriptions","organizations_url":"https://api.github.com/users/Nekitosss/orgs","repos_url":"https://api.github.com/users/Nekitosss/repos","events_url":"https://api.github.com/users/Nekitosss/events{/privacy}","received_events_url":"https://api.github.com/users/Nekitosss/received_events","type":"User","site_admin":false},"repo":{"id":130102320,"node_id":"MDEwOlJlcG9zaXRvcnkxMzAxMDIzMjA=","name":"DITranquillity","full_name":"Nekitosss/DITranquillity","private":false,"owner":{"login":"Nekitosss","id":17741730,"node_id":"MDQ6VXNlcjE3NzQxNzMw","avatar_url":"https://avatars3.githubusercontent.com/u/17741730?v=4","gravatar_id":"","url":"https://api.github.com/users/Nekitosss","html_url":"https://github.com/Nekitosss","followers_url":"https://api.github.com/users/Nekitosss/followers","following_url":"https://api.github.com/users/Nekitosss/following{/other_user}","gists_url":"https://api.github.com/users/Nekitosss/gists{/gist_id}","starred_url":"https://api.github.com/users/Nekitosss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nekitosss/subscriptions","organizations_url":"https://api.github.com/users/Nekitosss/orgs","repos_url":"https://api.github.com/users/Nekitosss/repos","events_url":"https://api.github.com/users/Nekitosss/events{/privacy}","received_events_url":"https://api.github.com/users/Nekitosss/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Nekitosss/DITranquillity","description":"Dependency injection for iOS (Swift)","fork":true,"url":"https://api.github.com/repos/Nekitosss/DITranquillity","forks_url":"https://api.github.com/repos/Nekitosss/DITranquillity/forks","keys_url":"https://api.github.com/repos/Nekitosss/DITranquillity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nekitosss/DITranquillity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nekitosss/DITranquillity/teams","hooks_url":"https://api.github.com/repos/Nekitosss/DITranquillity/hooks","issue_events_url":"https://api.github.com/repos/Nekitosss/DITranquillity/issues/events{/number}","events_url":"https://api.github.com/repos/Nekitosss/DITranquillity/events","assignees_url":"https://api.github.com/repos/Nekitosss/DITranquillity/assignees{/user}","branches_url":"https://api.github.com/repos/Nekitosss/DITranquillity/branches{/branch}","tags_url":"https://api.github.com/repos/Nekitosss/DITranquillity/tags","blobs_url":"https://api.github.com/repos/Nekitosss/DITranquillity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nekitosss/DITranquillity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nekitosss/DITranquillity/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nekitosss/DITranquillity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nekitosss/DITranquillity/statuses/{sha}","languages_url":"https://api.github.com/repos/Nekitosss/DITranquillity/languages","stargazers_url":"https://api.github.com/repos/Nekitosss/DITranquillity/stargazers","contributors_url":"https://api.github.com/repos/Nekitosss/DITranquillity/contributors","subscribers_url":"https://api.github.com/repos/Nekitosss/DITranquillity/subscribers","subscription_url":"https://api.github.com/repos/Nekitosss/DITranquillity/subscription","commits_url":"https://api.github.com/repos/Nekitosss/DITranquillity/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nekitosss/DITranquillity/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nekitosss/DITranquillity/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nekitosss/DITranquillity/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nekitosss/DITranquillity/contents/{+path}","compare_url":"https://api.github.com/repos/Nekitosss/DITranquillity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nekitosss/DITranquillity/merges","archive_url":"https://api.github.com/repos/Nekitosss/DITranquillity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nekitosss/DITranquillity/downloads","issues_url":"https://api.github.com/repos/Nekitosss/DITranquillity/issues{/number}","pulls_url":"https://api.github.com/repos/Nekitosss/DITranquillity/pulls{/number}","milestones_url":"https://api.github.com/repos/Nekitosss/DITranquillity/milestones{/number}","notifications_url":"https://api.github.com/repos/Nekitosss/DITranquillity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nekitosss/DITranquillity/labels{/name}","releases_url":"https://api.github.com/repos/Nekitosss/DITranquillity/releases{/id}","deployments_url":"https://api.github.com/repos/Nekitosss/DITranquillity/deployments","created_at":"2018-04-18T18:02:12Z","updated_at":"2019-12-16T13:24:30Z","pushed_at":"2019-12-20T10:51:33Z","git_url":"git://github.com/Nekitosss/DITranquillity.git","ssh_url":"git@github.com:Nekitosss/DITranquillity.git","clone_url":"https://github.com/Nekitosss/DITranquillity.git","svn_url":"https://github.com/Nekitosss/DITranquillity","homepage":null,"size":8648,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ivlevAstef:master","ref":"master","sha":"c709bea839a3ad5fbafaea7801f57bd53ef299a2","user":{"login":"ivlevAstef","id":5517599,"node_id":"MDQ6VXNlcjU1MTc1OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5517599?v=4","gravatar_id":"","url":"https://api.github.com/users/ivlevAstef","html_url":"https://github.com/ivlevAstef","followers_url":"https://api.github.com/users/ivlevAstef/followers","following_url":"https://api.github.com/users/ivlevAstef/following{/other_user}","gists_url":"https://api.github.com/users/ivlevAstef/gists{/gist_id}","starred_url":"https://api.github.com/users/ivlevAstef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivlevAstef/subscriptions","organizations_url":"https://api.github.com/users/ivlevAstef/orgs","repos_url":"https://api.github.com/users/ivlevAstef/repos","events_url":"https://api.github.com/users/ivlevAstef/events{/privacy}","received_events_url":"https://api.github.com/users/ivlevAstef/received_events","type":"User","site_admin":false},"repo":{"id":60842718,"node_id":"MDEwOlJlcG9zaXRvcnk2MDg0MjcxOA==","name":"DITranquillity","full_name":"ivlevAstef/DITranquillity","private":false,"owner":{"login":"ivlevAstef","id":5517599,"node_id":"MDQ6VXNlcjU1MTc1OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/5517599?v=4","gravatar_id":"","url":"https://api.github.com/users/ivlevAstef","html_url":"https://github.com/ivlevAstef","followers_url":"https://api.github.com/users/ivlevAstef/followers","following_url":"https://api.github.com/users/ivlevAstef/following{/other_user}","gists_url":"https://api.github.com/users/ivlevAstef/gists{/gist_id}","starred_url":"https://api.github.com/users/ivlevAstef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivlevAstef/subscriptions","organizations_url":"https://api.github.com/users/ivlevAstef/orgs","repos_url":"https://api.github.com/users/ivlevAstef/repos","events_url":"https://api.github.com/users/ivlevAstef/events{/privacy}","received_events_url":"https://api.github.com/users/ivlevAstef/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ivlevAstef/DITranquillity","description":"Dependency injection for iOS (Swift)","fork":false,"url":"https://api.github.com/repos/ivlevAstef/DITranquillity","forks_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/forks","keys_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/teams","hooks_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/hooks","issue_events_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/events{/number}","events_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/events","assignees_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/assignees{/user}","branches_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/branches{/branch}","tags_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/tags","blobs_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/git/refs{/sha}","trees_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/statuses/{sha}","languages_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/languages","stargazers_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/stargazers","contributors_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/contributors","subscribers_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/subscribers","subscription_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/subscription","commits_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/commits{/sha}","git_commits_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/git/commits{/sha}","comments_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/comments{/number}","issue_comment_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/comments{/number}","contents_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/contents/{+path}","compare_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/merges","archive_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/downloads","issues_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues{/number}","pulls_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls{/number}","milestones_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/milestones{/number}","notifications_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/labels{/name}","releases_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/releases{/id}","deployments_url":"https://api.github.com/repos/ivlevAstef/DITranquillity/deployments","created_at":"2016-06-10T11:20:39Z","updated_at":"2019-12-18T09:11:49Z","pushed_at":"2019-12-20T10:53:52Z","git_url":"git://github.com/ivlevAstef/DITranquillity.git","ssh_url":"git@github.com:ivlevAstef/DITranquillity.git","clone_url":"https://github.com/ivlevAstef/DITranquillity.git","svn_url":"https://github.com/ivlevAstef/DITranquillity","homepage":null,"size":8716,"stargazers_count":228,"watchers_count":228,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":25,"open_issues":12,"watchers":228,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152"},"html":{"href":"https://github.com/ivlevAstef/DITranquillity/pull/152"},"issue":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/152"},"comments":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/ivlevAstef/DITranquillity/statuses/451792e9d767984453d66c5262f197ea94838cb8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ivlevAstef"}}