# Ways to make slow/sluggish REPL/interactive development experience faster?

**URL:** <https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293>\
**Category:** Performance\
**Tags:** repl, ttfp\
**Created:** [June 14, 2019, 7:25am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293 "2019-06-14T07:25:41Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 16, 2019, 12:34am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/21 "2019-06-16T00:34:09Z")

</div>

Are you on `master`? I had the same error with the tagged version, but `master` works for me.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [June 16, 2019, 1:18am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/22 "2019-06-16T01:18:02Z")

</div>

> [@davidanthoff](#):
>
> julia -J

Thanks, that helped but I think there is a bug on Windows.

```julia-auto
julia -J C:\\Users\\j\\.julia\\packages\\PackageCompiler\\oT98U\\sysimg\\sys.dll
ERROR: could not load library "C:\Users\j\.julia\packages\PackageCompiler\oT98U\sysimg\sys.dll"
The specified module could not be found.

```

This happens because the sys.dll depends on a non-existing `msys-gcc-s-seh-1.dll`, whilst the official `sys.dll` depends on `libgcc_s_seh-1.dll` (on Windows one cannot just rename a dll).

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 16, 2019, 1:24am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/23 "2019-06-16T01:24:13Z")

</div>

I’m on Windows and it worked for me…

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [June 16, 2019, 1:28am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/24 "2019-06-16T01:28:25Z")

</div>

Hmm, can you check the dependencies of your `sys.dll`? I use [dependencies](https://github.com/lucasg/Dependencies) for that

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 16, 2019, 1:30am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/25 "2019-06-16T01:30:51Z")

</div>

Not anytime soon, about to travel again.

---

<div class="post-metadata">

**Author:** ![joa-quim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joa-quim/32/227_2.png) [@joa-quim](https://discourse.julialang.org/u/joa-quim)\
**Post date:** [June 16, 2019, 1:32am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/26 "2019-06-16T01:32:15Z")

</div>

OK, thanks anyway. I’ll figure it out.

---

<div class="post-metadata">

**Author:** ![TsurHerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tsurherman/32/1234_2.png) [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Post date:** [June 16, 2019, 8:34am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/27 "2019-06-16T08:34:14Z")

</div>

answering @JeffreySarnoff  
it should be able to produce something even if some statements trip it … Fezzik compiles everything it can  
and prints a warning for anything that it cannot parse or compile.

If the process ended without an error just tons of warnings, then the new system image should be more responsive to your needs even though it failed to compile a few things.

This is why it is called a “brute force package compiler”

---

<div class="post-metadata">

**Author:** ![JeffreySarnoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jeffreysarnoff/32/1980_2.png) [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Post date:** [June 16, 2019, 8:38am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/28 "2019-06-16T08:38:01Z")

</div>

yah – how does one encourage it to fold in packages? is it enough to do `using Pkg1, Pkg2` or is it necessary to interact with each package we would precomple. and in good situations, how much more responsive [qualitatively]?

---

<div class="post-metadata">

**Author:** ![TsurHerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tsurherman/32/1234_2.png) [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Post date:** [June 16, 2019, 9:03am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/29 "2019-06-16T09:03:51Z")

</div>

After the one-time setup Fezzik traces all compiler activity.  
So after setup just do something that you would normally do, run a simulation plot something  
load modules interact with Pkg, read some help files use Atom etc.

when you think you covered everything, start a new julia session and do `brute_build_julia()`  
This process can be done several times, on Mac and Linux Fezzik replaces the original sysimg with the modified one, so repeating the process is incremental.

On windows you will have to manually overwrite the sysimg(just follow instructions at the end of the build process)

> [@JeffreySarnoff](#):
>
> how much more responsive [qualitatively]?

Considerably more responsive to the point that I cannot work without it.  
You are welcome to time it.

---

<div class="post-metadata">

**Author:** ![pablosanjose](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pablosanjose/32/7006_2.png) [@pablosanjose](https://discourse.julialang.org/u/pablosanjose)\
**Post date:** [June 16, 2019, 5:29pm UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/30 "2019-06-16T17:29:34Z")

</div>

Quick questions @TsurHerman : if you do a Fezzik with, say, version 0.2 of your in-development package, and then you continue developing to version 0.3, can you update the brute-forced sysimg with the new version? Does the process build up any sort of cruft? Is performance the same if you Fezzik many times, overwriting stuff, than if you do it just once?

(I’m tentatively assuming the answers are yes, yes, and yes, but just to be sure…)

---

<div class="post-metadata">

**Author:** ![TsurHerman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tsurherman/32/1234_2.png) [@TsurHerman](https://discourse.julialang.org/u/TsurHerman)\
**Post date:** [June 17, 2019, 10:43am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/31 "2019-06-17T10:43:03Z")

</div>

Actually, it is better to blacklist your in-development package(see the readme).

But let’s say you have a farely stable package with version 0.2 and it is baked into the sysimg. Now let’s say you updated some minor things within that module and “re-evaluated” them using Juno’s built in eval-in-module or by other means. Then there will be a compiler log of that compilation and next time you “Fezzik” those statements will be compiled again and shadowing the previous version in the sysimg. So the answer is Yes (probably because I haven’t tested it 😜 … if you test it please let me know if this was true)

Usually the first brute force building catches a lot of the big things, subsequent brute builds usually adds some small stuff … interaction with Atom interactions with the help system git etc.  
so even if your in development module is not precompiled it will load much faster because all the little things it uses are already compiled.

In some versions of Julia 1.0x incremental building fails after a few sessions due to some dynamic initial state of packages etc.

It is easy to just do revert() and start over.

---

<div class="post-metadata">

**Author:** ![abe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abe/32/8911_2.png) [@abe](https://discourse.julialang.org/u/abe)\
**Post date:** [July 5, 2019, 3:34pm UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/33 "2019-07-05T15:34:59Z")

</div>

Thanks for pointing me to Revise, I think it’ll help a lot. I’ve also noticed massive differences in performance on different machines. Julia is really painful on my 2012 MacBook Pro (smaller model with only two cores and 8 GB RAM), but it’s much faster on my 2015 MacBook Pro with four cores and 16 GB RAM. I imagine this is due to compilation going faster with more and higher performance CPUs.

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [July 5, 2019, 11:56pm UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/34 "2019-07-05T23:56:39Z")

</div>

Code compilation doesn’t use multiple CPUs, so this is probably a mixture of an overall faster CPU core, higher IPC (instructions per clock), more powerful CPU instructions, and possibly (probably) faster RAM.

---

<div class="post-metadata">

**Author:** ![Charlie\_He](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/charlie_he/32/9465_2.png) [@Charlie\_He](https://discourse.julialang.org/u/Charlie_He)\
**Post date:** [July 23, 2019, 6:23am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/35 "2019-07-23T06:23:02Z")

</div>

PackageCompiler is nice and all, but if we can compile these packages on our devices, which is slow and takes hours, why can’t the central repository simply store these precompiled packages and make them available to install?

---

<div class="post-metadata">

**Author:** ![Masacroso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/masacroso/32/9412_2.png) [@Masacroso](https://discourse.julialang.org/u/Masacroso)\
**Post date:** [July 23, 2019, 6:56am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/36 "2019-07-23T06:56:17Z")

</div>

Maybe a workaround could be use RCall just for the plotting part. I didnt tested anyway.

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [July 23, 2019, 11:56am UTC](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293/37 "2019-07-23T11:56:36Z")

</div>

It might be doable, but it has a number of downsides. For one thing, it’d require storing 200MB+ per binary. Multiply that by the number of platforms you wish to support, and most packages are already over 1GB of storage requirements. Multiply that by the number of versions you want to support (at least one stable, and maybe one dev/master). Things get large, fast. I’m not sure if free Github plans support multiple GB stored for each repo under a single user/organization.

And even if each package did this, now you’d have to open a new Julia session for each package that you want to load quicker. Want to load 2 or more packages quickly? You have to hope someone else wanted exactly that combination of packages built into a binary together, and built for your platform.

[Previous page](https://discourse.julialang.org/t/ways-to-make-slow-sluggish-repl-interactive-development-experience-faster/25293.md?page=1)
