Just upgraded from 0.35.1 → 0.36.0, and when trying to run the spec suite on Lucky, it takes 10+ minutes to run. Is anyone else seeing this?
It seems that when I run
crystal spec the first time, it’s like 10 minutes until I see the first green dot output. Then if I run
crystal spec right after, the whole thing takes about 3 seconds to complete. After that, if I delete my
~/.cache/crystal/ and run
crystal spec again, it’s back to the 10+ minutes to complete. With 0.35.1, it was always ~5sec to run the suite.
Here’s a few things I noticed.
- I upgraded Crystal through homebrew on Mac (not the M1), and it took me from LLVM 10 to LLVM 9.
- With no cache, it takes a really long time, but with the cache, it’s quick
- While the specs are running, I checked my process and saw these:
// When running super slow ❯ ps aux | ack -i "crystal" jeremywoertink 2635 100.0 1.3 4609252 223000 s000 R+ 9:24AM 0:13.64 /usr/local/Cellar/crystal/0.36.0/libexec/crystal spec
// When running fast ❯ ps aux | ack -i "crystal" jeremywoertink 2484 98.7 0.7 4528900 115888 s000 R+ 9:21AM 0:00.69 /usr/local/Cellar/crystal/0.36.0/libexec/crystal eval require "./tmp/console/1611768102528_console.cr"; jeremywoertink 2480 8.4 0.2 4392600 26440 s000 S+ 9:21AM 0:00.29 /Users/jeremywoertink/.cache/crystal/crystal-run-spec.tmp jeremywoertink 2365 0.0 4.3 5202960 725908 s000 S+ 9:21AM 0:07.84 /usr/local/Cellar/crystal/0.36.0/libexec/crystal spec
- Clearing cache, and then building a spec runner file seems to take all the time.
# spec/spec_runner.cr require "./**"
crystal build spec/spec_runner.cr → With cache: 9s, Without cache: 9m36s
- This isn’t an issue when just building a normal crystal file.
❯ crystal -v Crystal 0.36.0 (2021-01-26) LLVM: 9.0.1 Default target: x86_64-apple-macosx MacOS: 10.15.7 (Catalina)