Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

RedundantAssignmentIssue is extremely slow when the control flow graph is complex #476

Open
corngood opened this issue Apr 10, 2015 · 0 comments

Comments

@corngood
Copy link

This is probably easiest to explain by showing the test I wrote:

corngood@c35584b

This test will take an extremely long time to complete, and scales non-linearly with the number of if statements. When walking a complex part of the call-graph which doesn't contain any references to the variable, it ends up doing an exhaustive search in RedundantAssignmentIssue.GatherVisitor.ProcessNode.

My initial thought was to just flag variables without any non-assignment references, but A slight variation on the test:

corngood@bf5fe2a

shows the same behaviour can occur even when a reference exists.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant