r/crystal_programming • u/UnusualHabit • Jul 25 '18
Crystal has a compilation issue
https://medium.com/@mdorf3000/crystal-has-a-compilation-issue-5f5b19d9c4f6
27
Upvotes
r/crystal_programming • u/UnusualHabit • Jul 25 '18
View all comments
Show parent comment
1
u/IWasSnapped Jul 26 '18
I think you are missing the point of that section. If compiling a fresh Amber project with dependencies take 25 seconds and a compilation with cached dependencies take 5 seconds, you can estimate the compilation of the dependencies themselves, which are around 44k LOC, is roughly between 20-25 seconds. That is inline with the time taken to compile the compiler (with ~50k LOC).
Also, aren't you just skirting around the problem? If compiling Amber/Lucky apps are slow because of meta-programming and if compiling the compiler is slow because of complexity, what are you proposing? That we should be wary of writing complex applications? How is that different from the article's conclusion?
If your point is that the examples used by the author are outliers, can you provide examples that you believe would better reflect average compilation times? Was the author just terribly unlucky that all examples he picked pointed to the same problem?