# Julia 0.7.0-alpha strange package loading

**URL:** <https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 2, 2018, 7:30am UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359 "2018-06-02T07:30:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [June 2, 2018, 7:30am UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/1 "2018-06-02T07:30:40Z")

</div>

On Julia 0.7.0-alpha I am testing DataFrames.jl package on Windows 10. It should be already precompiled (it is not the first time I load it). The strange behavior I get is the following. When I get to this state of REPL:

```julia
$ /d/Julia7/bin/julia
               _
   _ _ _(_)_ | A fresh approach to technical computing
  (_) | (_) (_) | Documentation: https://docs.julialang.org
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 0.7.0-alpha.0 (2018-05-31 00:07 UTC)
 _/ |\ __'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-w64-mingw32

julia> using DataFrames
 19.202774 seconds (20.17 M allocations: 1.171 GiB, 2.11% gc time)

julia>

```

it hangs for ~1 minute (and Julia is using 100% of one core for something) - i.e. REPL shows the prompt but is not responsive. Also, package loading time is very long as you can see.

I was wondering if anyone has also encountered such problems and what is the best way to investigate what is causing the lag?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 3, 2018, 5:13pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/2 "2018-06-03T17:13:09Z")

</div>

You could try clear out `.julia/compiled` to force a recompile from scratch.

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [June 3, 2018, 5:46pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/3 "2018-06-03T17:46:05Z")

</div>

Unfortunately this did not help. Do you have any hints:

1. why recompiling from scratch could have helped (apart from a basic reasoning that if all else fails this is something that should be tried).
2. what could possibly cause such lags (so that I can track down the reasons and update DataFrames.jl with a proper PR to fix it).

Thanks!

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 3, 2018, 6:01pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/4 "2018-06-03T18:01:30Z")

</div>

I was thinking about [https://github.com/JuliaLang/julia/issues/25900](https://github.com/JuliaLang/julia/issues/25900) (and [https://github.com/JuliaPlots/Plots.jl/issues/1379](https://github.com/JuliaPlots/Plots.jl/issues/1379)).

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [June 3, 2018, 6:41pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/5 "2018-06-03T18:41:32Z")

</div>

> [@bkamins](#):
>
> I was wondering if anyone has also encountered such problems and what is the best way to investigate what is causing the lag?

I’ve encountered some incredibly slow package loading in 0.7. I seem to remember this only being on the initial pre-compile. I’ll try to post back here with specifics when I see it again.

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [June 3, 2018, 6:45pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/6 "2018-06-03T18:45:12Z")

</div>

I have dug into dependencies of DataFrames to check what causes biggest lags. On my machine those are WeakRefStrings and CategoricalArrays.

CC @quinnj @nalimilan as you probably know those packages best (if you have time to have look at the issue of course 😄).

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [June 3, 2018, 6:59pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/7 "2018-06-03T18:59:49Z")

</div>

Thank you. Can you please check DataFrames on your machine?

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [June 3, 2018, 7:15pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/8 "2018-06-03T19:15:30Z")

</div>

A staggering 129s.

There’s a lot wrong though. Something is going on in StatsBase, it gets tons of method overwrite warnings. I know DataStreams badly needs to be tagged. Probably lots of things really need to be tagged.

---

<div class="post-metadata">

**Author:** ![bkamins](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bkamins/32/208538_2.png) [@bkamins](https://discourse.julialang.org/u/bkamins)\
**Post date:** [June 3, 2018, 7:25pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/9 "2018-06-03T19:25:09Z")

</div>

Thanks! Unfortunately yes. I get those warnings on the first compilation also, but on the following I do not get any output with warnings.  
But maybe those deprecations are causing all the lags - if this were the case then it is not so bad - we simply have to update all packages and all would be back normal.

---

<div class="post-metadata">

**Author:** ![ExpandingMan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/expandingman/32/866_2.png) [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Post date:** [June 3, 2018, 7:27pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/10 "2018-06-03T19:27:55Z")

</div>

> [@bkamins](#):
>
> But maybe those deprecations are causing all the lags - if this were the case then it is not so bad - we simply have to update all packages and all would be back normal.

It’s _reeealllyyy_ slow so I’m not quite that optimistic, but certainly it is time to update all the DataFrames dependencies regardless.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 3, 2018, 7:29pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/11 "2018-06-03T19:29:16Z")

</div>

If you get method overwrite warnings when precompiling it is likely that loading that package will invalidate a lot of code (needs to be recompiled) and be very slow to load.

The method overwrite warnings should definitely be investigated.

---

<div class="post-metadata">

**Author:** ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)\
**Post date:** [June 3, 2018, 7:37pm UTC](https://discourse.julialang.org/t/julia-0-7-0-alpha-strange-package-loading/11359/12 "2018-06-03T19:37:26Z")

</div>

I think it’s worth waiting until we’ve fixed all deprecations, they frequently cause large slowdowns.
