# How to use Pluto with DrWatson effectively?

**URL:** https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582
**Category:** Pluto
**Tags:** drwatson
**Created:** [May 21, 2021, 11:55am UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582 "2021-05-21T11:55:15Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![amit1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amit1/32/25318_2.png) [@amit1](https://discourse.julialang.org/u/amit1)
#### Post date: [May 21, 2021, 11:55am UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/1 "2021-05-21T11:55:15Z")

</div>

I would like to use Pkg, DrWatson and Pluto notebooks as my main workflow. However I am not able to understand how to effectively use it. Mostly every notebook i open it takes about a min to load libraries. For example during loading a notebook, following codeblock always takes about a min to execute.

```Julia
begin
	@quickactivate "StatisticalRethinkingTuring"
	using StatisticalRethinking
end

```

I was under impression that libraries are slow for the first time, as they are precompiled, following that every load is fast. Indeed the bloack above it

```Julia
using Pkg, DrWatson

```

executes in miliseconds. How can I ensure that everytime I load the notebook it does not take minutes to activate and load requirements?

---

<div class="post-metadata">

### Author: ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)
#### Post date: [June 10, 2021, 7:08pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/2 "2021-06-10T19:08:15Z")

</div>

@amit1

Apologies, I’d missed your post.

On my system I see 160ms for `using Pkg, DrWatson` and 26s for

```julia
begin
	@quickactivate "StatisticalRethinkingTuring"
	using Turing 
	using StatisticalRethinking
	Turing.setprogress!(false);
end;

```

---

<div class="post-metadata">

### Author: ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)
#### Post date: [June 10, 2021, 7:35pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/3 "2021-06-10T19:35:29Z")

</div>

I wonder if the sequence you use to start Pluto might cause this huge difference.

My workflow is as follows:

1. In Julia 1.6 REPL I activate package mode and update: `] update StatisticalRethinkingTuring`.
2. Typically in a separate Terminal I navigate to `.julia/dev/StatisticalRethinkingTuring/notebooks` and start Pluto using an alias: `alias pluto="clear; j -i -e 'using Pkg; import Pluto; Pluto.run()'"`

This alias starts Julia with only preinstalled 4 packages: Pkg, DrWatson, Pluto and PlutoUI.

---

<div class="post-metadata">

### Author: ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)
#### Post date: [June 10, 2021, 8:02pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/4 "2021-06-10T20:02:49Z")

</div>

Aaah, on my system, when it takes that long, in the Terminal where Pluto is started I see many, many messages. I mostly worked in Julia v1.7 until a day or 2 ago. I’ll play around with Julia v1.6.

---

<div class="post-metadata">

### Author: ![amit1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amit1/32/25318_2.png) [@amit1](https://discourse.julialang.org/u/amit1)
#### Post date: [June 10, 2021, 9:14pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/5 "2021-06-10T21:14:42Z")

</div>

No issues. I started similar thread (which is linked here too) on how to effectively develop in julia, and this multi second delays in loading libraries etc is one of the major reason I am still not able to give up on python full time.

My sequence for starting Pluto includes

1. cd into StatisticalRethiningTuring.jl
2. start Julia REPL
3. ] activate .
4. using Pluto; Pluto.run()

I have installed Turing in this environment only, ie

1. ] activate .
2. add Turing

So as to keep environments seperate like in venv python.

---

<div class="post-metadata">

### Author: ![goedman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/goedman/32/217_2.png) [@goedman](https://discourse.julialang.org/u/goedman)
#### Post date: [June 11, 2021, 12:50pm UTC](https://discourse.julialang.org/t/how-to-use-pluto-with-drwatson-effectively/61582/6 "2021-06-11T12:50:06Z")

</div>

Did do a quick check on Julia 1.6 (not sure if Turing is fully tested on 1.7 yet) and get a loading time of about 17s. I do have to add `;dpi = 460` to plot() commands to get reasonable size graphics.

Edited: Had not seen the nice response by @sijo in that thread.
