# Roadmap for a faster time-to-first-plot?

**URL:** https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956
**Category:** Internals & Design
**Tags:** ttfp
**Created:** [April 9, 2019, 1:22pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956 "2019-04-09T13:22:42Z")
**Posts on this page:** 12
**Page:** 13

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [February 6, 2020, 3:40pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/243 "2020-02-06T15:40:57Z")

</div>

Hmm. I get much better results with the “package compiled” `Plots` version:

```julia
% julia -J /usr/local/lib/julia/packages/PackageCompiler/CJQcs/sysimg/sys
julia> @time using Plots; gr(); display(plot(randn(10)))
  0.000909 seconds (1.24 k allocations: 61.531 KiB)

julia> versioninfo()
Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.6.0)
  CPU: Intel(R) Core(TM) i7-8569U CPU @ 2.80GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_DEPOT_PATH = /usr/local/lib/julia:
  JULIA_HISTORY = /Users/jheinen/.julia/logs/repl_history.jl

(v1.3) pkg> st Plots
    Status `/usr/local/lib/julia/environments/v1.3/Project.toml`
  [53c48c17] FixedPointNumbers v0.6.1
  [28b8d3ca] GR v0.46.0 #master (https://github.com/jheinen/GR.jl.git)
  [77ba4419] NaNMath v0.3.3
  [ccf2f8ad] PlotThemes v1.0.1
  [995b91a9] PlotUtils v0.6.2 #master (https://github.com/JuliaPlots/PlotUtils.jl.git)
  [91a5bcdd] Plots v0.28.5 #master (https://github.com/JuliaPlots/Plots.jl.git)
  [3cdcf5f2] RecipesBase v0.7.0 #master (https://github.com/JuliaPlots/RecipesBase.jl.git)
  [992d4aef] Showoff v0.3.1 #master (https://github.com/JuliaGraphics/Showoff.jl.git)
  [2913bbd2] StatsBase v0.32.0

```

I use [snoop-Plots.jl](https://github.com/jheinen/GR.jl/blob/master/examples/snoop-Plots.jl) as a workload for `Plots.jl`.

---

<div class="post-metadata">

### Author: ![jheinen](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jheinen/32/2787_2.png) [@jheinen](https://discourse.julialang.org/u/jheinen)
#### Post date: [February 6, 2020, 3:50pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/244 "2020-02-06T15:50:46Z")

</div>

If you have trouble with the above workload script (on macOS), you probably have to comment out the `StatsPlots` test in the end. See note from @ianfiske …

---

<div class="post-metadata">

### Author: ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)
#### Post date: [February 20, 2020, 11:00pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/245 "2020-02-20T23:00:56Z")

</div>

Did anything come out of this yet? Any tooling for more precisely identifying why inference/compile-time is slow?

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 20, 2020, 11:10pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/246 "2020-02-20T23:10:59Z")

</div>

Lots of things. We noticed the Plots.jl time actually goes to around 5 seconds with -O0, so we were underestimating the LLVM time and that means there’s more to do there. It’s somewhat hard to benchmark because the issues now that precompile files have been enhanced are mostly about method invalidation: someone defines a lower dispatch that “infects” that suddenly causes a lot less precompile to be reused. A big issue in CSV.jl was noted to be due to that, and that’s really where all of the profiling seems to lead. Some of that could be fixed by moving some more of these basic dispatches to Base.

---

<div class="post-metadata">

### Author: ![Karajan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karajan/32/8545_2.png) [@Karajan](https://discourse.julialang.org/u/Karajan)
#### Post date: [February 21, 2020, 8:27am UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/247 "2020-02-21T08:27:26Z")

</div>

Sounds great! Where could I follow the progress or discussions? I didn’t find anything recent.

---

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [February 21, 2020, 9:22am UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/248 "2020-02-21T09:22:24Z")

</div>

Come to Boston 🙂! A lot of this is just developing daily. and things get online as they get more concrete.

---

<div class="post-metadata">

### Author: ![Karajan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/karajan/32/8545_2.png) [@Karajan](https://discourse.julialang.org/u/Karajan)
#### Post date: [February 21, 2020, 10:41am UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/249 "2020-02-21T10:41:04Z")

</div>

I’d love to but there are ~6000km and a big ocean in the way. I guess I’ll just have to be patient then 😄

---

<div class="post-metadata">

### Author: ![disadone](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/disadone/32/27089_2.png) [@disadone](https://discourse.julialang.org/u/disadone)
#### Post date: [August 2, 2021, 2:31pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/250 "2021-08-02T14:31:13Z")

</div>

It’s such a long post! I lost the point. Is there a roadmap?

---

<div class="post-metadata">

### Author: ![Albert\_Zevelev](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/albert_zevelev/32/11844_2.png) [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)
#### Post date: [August 2, 2021, 3:23pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/251 "2021-08-02T15:23:28Z")

</div>

We’re mostly already there

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [August 2, 2021, 8:36pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/252 "2021-08-02T20:36:52Z")

</div>

For the record, @jzr mentioned a while back in another post the [SandDance](https://microsoft.github.io/SandDance/) extension for VSCode. If Julia code writes the data to be plotted to disk as a CSV file, a right click to view it in SandDance is instantaneous. Yes, the number of plot types is limited, but powerful for some applications.

```julia
using DelimitedFiles
x = 0:0.1:2π
y = sin.(x)
open("delim_file_4_sanddance.csv", "w") do io
    writedlm(io, ["X" "Y"], ',')
    writedlm(io, [x y], ',')
end

```

 ![VSCode_csv_view_with_sanddance](https://global.discourse-cdn.com/julialang/original/3X/b/a/ba93b736f026bb30055c6b9ef508242ba8812e38.png)

It would be handy to have a sandance function available: `sanddance.view(filename) `

---

<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: [August 2, 2021, 8:41pm UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/253 "2021-08-02T20:41:19Z")

</div>

I started a Julia wrapper at some point: [https://github.com/queryverse/SandDance.jl](https://github.com/queryverse/SandDance.jl). But it is not well maintained, not sure whether it even works at all right now…

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [August 3, 2021, 12:07am UTC](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956/254 "2021-08-03T00:07:07Z")

</div>

@davidanthoff, SandDance.jl works pretty well (Win10, Julia 1.7). The time to first plot seems to be \< 2 s for small datasets and about 4-5 s for ~10K points. Thank you.

```julia
# pkg> add https://github.com/queryverse/SandDance.jl
using SandDance, DataFrames
f(x,y) = exp(-x^2*y^2)*sin(x*y)
n = 100
x = y = LinRange(-π, π, n)
xx = x' .* ones(n)
yy = ones(n)' .* y
zz = f.(xx,yy)
data2d = DataFrame(x=xx[:], y=yy[:], z=zz[:])
SandDanceWindow(data2d)

```

 ![VSCode_SandDance_scatter_heatmap](https://global.discourse-cdn.com/julialang/original/3X/7/0/7041cd07d69ace960c708d7ed6f67555a2adb0d8.jpeg)

[Previous page](https://discourse.julialang.org/t/roadmap-for-a-faster-time-to-first-plot/22956.md?page=12)
