usethesource / rascal

The implementation of the Rascal meta-programming language (including interpreter, type checker, parser generator, compiler and JVM based run-time system)
http://www.rascal-mpl.org
Other
396 stars 79 forks source link

typechecker significant slow-down #1567

Open jurgenvinju opened 2 years ago

jurgenvinju commented 2 years ago

Describe the bug

Given that the interpreter did not change much in the past year, we could assume that it is an algorithmic effect in the execution of the Rascal typepal collector or in the typepal solver.

So running the Rascal profiler seems to best first step to take, to see if we have new hotspots in the Rascal code of the type-checker.

Note that the impact of the problem is excacerbated by usethesource/rascal-maven-plugin#5 which causes the type-checker to run again and again during a Github Action job. However, this effect was not included in the timings above 9--54 is an honest comparison between two runs of the type-checker on a real library.

jurgenvinju commented 2 years ago

Still there could also be other factors causing this slow-down:

DavyLandman commented 2 years ago

The first two could easily be figured out right?

Rascal core is not depending on java 11 features, so it could without a problem be loaded in a java 8 rascal jar? And use that for the same typecheck operation?

Similarly, if you run locally, we could rule out great interactions from GitHub actions. But I want to say that there's a small chance of that causing a big change. Like a few minutes difference: sure.

jurgenvinju commented 2 years ago

3 hours or 2 hours; https://github.com/usethesource/rascal/actions we should be able to explain the differences between these last few runs with big differences in efficiency.

DavyLandman commented 2 years ago

Yup, but does it also run much slower on your own laptop?

jurgenvinju commented 2 years ago

Yes that too. Rodin just found the cause of that. No tpl file was ever reused.

PaulKlint commented 2 years ago

In the end these were path issues with various accumulating/overlapping causes. This is now probably fixed but let's leave this open until we can confirm that the slowdown has disappeared.