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

Make BartyCrouch fast again #132

Merged
merged 2 commits into from
May 13, 2019
Merged

Conversation

fredpi
Copy link
Contributor

@fredpi fredpi commented May 10, 2019

This PR closes #128. The only change is that the line number is no longer resolved by each match individually, instead, a linebreak → index map is created once per file, that can then be used by each individual match to get the corresponding line quickly.

When adjusting the line algorithm, I noticed that this was actually already implemented before, but then commented out for some reason. I guess it's still valid to take this approach again, as this resolves the huge speed problem present since Xcode 10.2.

@Jeehut
Copy link
Member

Jeehut commented May 13, 2019

Looks like it was commented out in this commit whose message doesn't explain why it was commented out, but it was during the big refactoring, so I'm guessing there was a problem either with builds or tests failing. Since the tests seem to be passing though, it looks good to me. You probably solved the issue with the + 1 at the end. Merging.

Thanks for tackling this!

@Jeehut Jeehut merged commit 8189eb8 into FlineDev:stable May 13, 2019
@fredpi fredpi deleted the work/#128-speedup branch May 13, 2019 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BartyCrouch runs much slower with Xcode 10.2
2 participants