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

Speed up analysis #13

Open
borkdude opened this issue Dec 21, 2020 · 1 comment
Open

Speed up analysis #13

borkdude opened this issue Dec 21, 2020 · 1 comment

Comments

@borkdude
Copy link
Owner

Two ideas:

  • Allow processing of files in parallel (see for the same trick the clj-kondo code)
  • Allow predicate hook on file and/or parsed sexpr to decide if it's worth to analyze at all. E.g. (not (str/includes? (pr-str form) "assoc"))
@borkdude
Copy link
Owner Author

borkdude commented Dec 22, 2020

It turns out with only grasping in parallel we can get a long way. This script demonstrates how that can be done:

https://gist.github.com/borkdude/e6f0b12f9352f3375e5f3277d2aba6c9

In 15 seconds I can grasp my entire .m2 folder (with 3348 jar files in it) in 15 seconds:

$ ~/Dropbox/temp/assoc_pairs.clj
Logged errors to /var/folders/2m/h3cvrr1x4296p315vbk7m32c0000gp/T/assoc_pairs_errors.txt
Total: 25629
 1: ********************************************************************************** (20911, 82%)
 2: ************ (3036, 12%)
 3: ***** (1085, 5%)
 4: ** (327, 2%)
 5: * (126, 1%)
 6: * (64, 1%)
 7: * (33, 1%)
10: * (23, 1%)
 8: * (11, 1%)
 9: * (6, 1%)
14: * (4, 1%)
 0: * (1, 1%)
12: * (1, 1%)
16: * (1, 1%)

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

No branches or pull requests

1 participant