# ApproxFun causes Jupyter to hang

**URL:** https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147
**Category:** General Usage
**Created:** [October 11, 2018, 3:30am UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147 "2018-10-11T03:30:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![LewisHein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewishein/32/5690_2.png) [@LewisHein](https://discourse.julialang.org/u/LewisHein)
#### Post date: [October 11, 2018, 3:30am UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/1 "2018-10-11T03:30:36Z")

</div>

Hey everyone, I’m currently trying to use ApproxFun in a Jupyter notebook, but the cell containing `Using ApproxFun` never terminates. I can load ApproxFun fine (albeit a bit slowly) in the terminal

Is this a known issue? Is there a known workaround?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Ajaychat3](https://avatars.discourse-cdn.com/v4/letter/a/ecd19e/32.png) [@Ajaychat3](https://discourse.julialang.org/u/Ajaychat3)
#### Post date: [October 11, 2018, 7:40am UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/2 "2018-10-11T07:40:22Z")

</div>

Here is what I get with julia 1.0 on windows 10.

```julia
julia> @time using ApproxFun
30.295569 seconds (61.13 M allocations: 4.873 GiB, 3.71% gc time)

```

In Jupyter notebook

```julia
@time using ApproxFun
29.376509 seconds (61.04 M allocations: 4.867 GiB, 3.57% gc time)

```

I think the issue here is why so slow to load and huge allocations.

---

<div class="post-metadata">

### Author: ![LewisHein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewishein/32/5690_2.png) [@LewisHein](https://discourse.julialang.org/u/LewisHein)
#### Post date: [October 11, 2018, 12:07pm UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/3 "2018-10-11T12:07:48Z")

</div>

Are those 4.867 GiB allocated all at once? My computer has only 4…

---

<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: [October 11, 2018, 1:07pm UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/4 "2018-10-11T13:07:34Z")

</div>

> [@LewisHein](#):
>
> Are those 4.867 GiB allocated all at once?

No, it is the total allocation during the execution of the command.

---

<div class="post-metadata">

### Author: ![dlfivefifty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlfivefifty/32/1959_2.png) [@dlfivefifty](https://discourse.julialang.org/u/dlfivefifty)
#### Post date: [October 11, 2018, 7:29pm UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/5 "2018-10-11T19:29:41Z")

</div>

There are compiler regressions in Julia v1.0 that cause this large compile time, I believe due to large union types. The issue starts with the pack LowRankApprox.jl, which has many `StridedArray ` overrides.

Hopefully this issue will be resolved in 1.x.

---

<div class="post-metadata">

### Author: ![LewisHein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lewishein/32/5690_2.png) [@LewisHein](https://discourse.julialang.org/u/LewisHein)
#### Post date: [October 11, 2018, 7:41pm UTC](https://discourse.julialang.org/t/approxfun-causes-jupyter-to-hang/16147/6 "2018-10-11T19:41:29Z")

</div>

Sure, but they could still be allocated almost all at once or one GiB at a time. They could be retained or freed for all @time tells us
