# \[ANN\] ProfileVega.jl

**URL:** https://discourse.julialang.org/t/ann-profilevega-jl/33880
**Category:** Package Announcements
**Created:** [January 27, 2020, 11:16pm UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880 "2020-01-27T23:16:20Z")
**Posts on this page:** 5
**Page:** 1

<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: [January 27, 2020, 11:16pm UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880/1 "2020-01-27T23:16:20Z")

</div>

[ProfileVega.jl](https://github.com/davidanthoff/ProfileVega.jl) is a small package that visualizes profile results with [VegaLite.jl](https://github.com/queryverse/VegaLite.jl). The API is almost identical to [ProfileSVG.jl](https://github.com/timholy/ProfileSVG.jl).

This works especially well for [JupyterLab](https://github.com/jupyterlab/jupyterlab) and [nteract](https://nteract.io/), where this package gives you nice interactivity inside a notebook environment. You can of course also use it from the REPL.

---

<div class="post-metadata">

### Author: ![Alec\_Loudenback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alec_loudenback/32/278_2.png) [@Alec\_Loudenback](https://discourse.julialang.org/u/Alec_Loudenback)
#### Post date: [January 28, 2020, 2:07am UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880/2 "2020-01-28T02:07:41Z")

</div>

That’s awesome, thanks!

---

<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: [January 28, 2020, 2:19am UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880/3 "2020-01-28T02:19:16Z")

</div>

I should add that I plan to add this natively to the VS Code extension as well. No timeline, but it should actually be fairly simple.

---

<div class="post-metadata">

### Author: ![e3c6](https://avatars.discourse-cdn.com/v4/letter/e/e79b87/32.png) [@e3c6](https://discourse.julialang.org/u/e3c6)
#### Post date: [January 28, 2020, 9:21am UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880/4 "2020-01-28T09:21:06Z")

</div>

Very useful, thanks!

Running the example on the README:

```julia
function profile_test(n)
    for i = 1:n
        A = randn(100,100,20)
        m = maximum(A)
        Am = mapslices(sum, A; dims=2)
        B = A[:,:,5]
        Bsort = mapslices(sort, B; dims=1)
        b = rand(100)
        C = B.*b
    end
end

profile_test(1) # run once to compile

using Profile, ProfileVega
Profile.clear()
@profview profile_test(10)

```

I get some warnings:

```julia
WARN Can not resolve event source: window

```

Here is a screenshot:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/3/f32b212ba9b06452d22d9111ca6cd230450fc7b2.png)

---

<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: [January 28, 2020, 6:12pm UTC](https://discourse.julialang.org/t/ann-profilevega-jl/33880/5 "2020-01-28T18:12:12Z")

</div>

These warnings are generated when one tries to display an interactive vega-lite spec in Jupyter. Whenever such a spec is displayed, we also create a PNG version in the background that is shipped to Jupyter, so that such a notebook displays something, even if the specific notebook client doesn’t support interactive features. This warning comes up during the PNG generation.

For now you can just ignore the message.

I’m about to merge a PR to `VegaLite#master` that hides that message, so in the future this should just go away.
