-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Inference performance regression vs 1.1 (MDDatasets.jl) #33336
Comments
Further bisect points to #30577 as the cause for the slowdown (cc @JeffBezanson):
|
You mean the one from 80s -> 152s? |
Yes. |
That's probably because that commit allows us to better infer NamedTuple constructors, so inference is doing more work. |
I don't know if we should but a 1.3 milestone on this. It is not a regression since 1.2 but if we would have found it in 1.2 we probably would have milestoned it. |
The operator definitions in MDDatasets (src/datasetop_reg.jl) seem to be causing nearly everything to be invalidated. |
Even with everything invalidated, it takes 2 hours to run now. Should be enough to recompile everything many times over? |
Yes there are probably multiple issues here. |
When inferring
Maybe there is a large cycle of calls that don't get cached? |
One issue is that MDDatasets defines methods of |
Fixes #33336. This addresses some commonly-occurring cases where having too little type info makes inference see a lot of recursion in Base that is not actually possible.
Fixes #33336. This addresses some commonly-occurring cases where having too little type info makes inference see a lot of recursion in Base that is not actually possible.
Fixes #33336. This addresses some commonly-occurring cases where having too little type info makes inference see a lot of recursion in Base that is not actually possible.
For MDDatasets the following code
takes 80 seconds in 1.1 but seems to hang indefinitely on 1.2 and 1.3. Interrupting gives a stack trace deep into inference.
In addition, just loading MDDatasets make the REPL become extremely sluggish for a while on 1.2 and 1.3 (everything getting invalidated?). This is also noticeable on 1.1 but to a much smaller degree.
Here is an example that shows the REPL experience after loading the package (note that I show key pressed on the keyboard). After loading the package and typing
1
it takes about 6 seconds for it to appear in the REPL input field. Pressing enter then takes ~10 seconds for the result to show:Edit:
1.2 finished:
1.3 finished:
The text was updated successfully, but these errors were encountered: