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

Add caching of Structure and SyntaxMap. #37

Merged
merged 1 commit into from
May 26, 2015
Merged

Conversation

nschum
Copy link
Contributor

@nschum nschum commented May 26, 2015

There is no need to read them individually for every rule.
This cuts execution time by more than 50%.

I've designed the change to be minimally-invasive. Alternatively, I think it might be cleaner to pass a pre-filled custom struct into ASTRule instead of SourceKitten.File.

There is no need to read them individually for every rule.
This cuts execution time by more than 50%.
@jpsim
Copy link
Collaborator

jpsim commented May 26, 2015

Thanks, yeah the initial implementation was very naive, but the tool ran quickly enough in my tests for it not to bother me too much.

I agree it would be cleaner to make a type for this which could get passed around instead of File, but this is something we can do later on.

Nice work! 🎉

jpsim added a commit that referenced this pull request May 26, 2015
Add caching of Structure and SyntaxMap.
@jpsim jpsim merged commit 5bdd93d into realm:master May 26, 2015
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.

2 participants