Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft.CodeAnalysis.Differencing.Match.ComputeMatchForLabel performance and maintainability improvements #19163

Open
ivanbasov opened this issue May 2, 2017 · 0 comments

Comments

@ivanbasov
Copy link
Contributor

The Microsoft.CodeAnalysis.Differencing.Match.ComputeMatchForLabel method attempts to approximate an O(N^2) matching algorithm with multiple passes with difference distance thresholds. It is expected that those passes are often executed within O(N). However, it is not guaranteed and, O(N^2) still happens often.

Moreover, it is observed that:

  1. Passes perform the same calculations multiple times. We can fix this by saving information between passes.
  2. Solving some matching issues involve maintaining the set of thresholds. See support CasePatternSwitchLabel in StatementSyntaxComparer  #18970. This looks fragile.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants