-
Notifications
You must be signed in to change notification settings - Fork 143
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
Tab-completion in REPL hangs #537
Comments
I cannot reproduce with 0.5.16. Are you using the standard Julia REPL? Do you have many files in your current folder by chance? |
I think this is an issue with Julia 1.2; please try with the newly released Julia 1.3 and I believe it should be resolved. |
I should have said I tried on 1.2. |
The behavior seems about the same in Julia 1.3. The problem also goes away when I remove imports from FilePathsBase. @nalimilan I tried in an empty directory as well as a local clone of CSV.jl. I'm using the standard Julia REPL. Let me know if I can try anything else to help you reproduce. FWIW, a few of my colleagues were seeing the same problem until we downgraded to v0.5.13. At least one person said the hang was longer than two minutes. |
Here is a clue that could help. I restarted with a clean install of Julia 1.3. With just CSV installed in the global package space the test with CSV.Fi and then tab took ~6 seconds. I then added DataFrames and repeated the test. It took ~28 seconds. I tried this a few times and it was very repeatable. If other people have more packages installed then that could explain the even longer times. |
That's really weird since DataFrames is a dependency of CSV already, so it should be loaded (in the background) disregarding the fact that you install it directly or not. |
From Mason Potter on Julia Slack... (Link will be invalid soon, but for now it is here https://julialang.slack.com/archives/C6A044SQH/p1575567273095800?thread_ts=1575565771.092300&cid=C6A044SQH.)
|
I don't think that's related: 20s is really too much for recompilation of some methods. And why wouldn't it be reproducible on other machines? |
I have the same problem with julia 1.3.0 on Mac.
|
Then it really looks like loading CSV invalidates some compiled methods. That shouldn't take 30s, though. Can you try loading CSV's dependencies progressively to see what dependency or combination of dependencies triggers the problem? For example, it could be an interaction between FilePathsBase and CategoricalArrays. |
I've tried many combinations. It looks like the culprit is the combination of DataFrames and FilePathBase. The TAB key for this test took a little less time ~24 seconds.
My versions:
|
Maybe |
Reports from Base Julia is that this issue is fixed on Julia 1.3.1 and master; please comment here if you still see issues on those versions. Reference: JuliaLang/julia#34098 (comment) |
@quinnj As requested commenting here because the issue seems to persist on 1.3.1 release: JuliaLang/julia#34098 (comment) |
Yep still happens |
Can anyone confirm that commenting out this makes the problem pretty much go away? In addition, the same is true for the So it seems that the |
@KristofferC I have replicating it again with latest version of everything. Then, I tried your suggestions.
|
Thanks for trying it out. I have seen something similar happen before in Base, see this discussion: JuliaLang/julia#27874 (comment). The workaround was in JuliaLang/julia@198e452. Here it is probably a similar inference cycle within |
I don't see why either DataFrames or FilePathsBase overload |
Should we reopen this issue? Or perhaps we should just fix DataFrames and FilePathsBase? |
It is not really a CSV issue since it is reproducible with just DataFrames and FilePathsBase. |
I narrowed this problem down to v0.5.14 of the CSV package. More specifically, commit 745bb25. v0.5.13 does not exhibit the issue.
Test:
Result:
Auto-completing to CSV.File takes more than 20 seconds. I ran top while this occurs and observed the CPUs spiking to 100% utilization.
I saw that commit 745bb25 added the FilePathsBase package. I commented out references to the structs you're using from that package (AbstractPath and SystemPath) and the problem went away. Interestingly, the issue did not occur if I repeated the test by only importing the FilePathsBase package.
Config:
Julia 1.2
Arch Linux version 2019.11.01
The text was updated successfully, but these errors were encountered: