# Can I SnoopPrecompile a Genie.jl app?

**URL:** <https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202>\
**Category:** Tooling\
**Tags:** genie\
**Created:** [April 7, 2023, 3:59am UTC](https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202 "2023-04-07T03:59:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [April 7, 2023, 3:59am UTC](https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202/1 "2023-04-07T03:59:28Z")

</div>

SnoopPrecompile can be used to precompile a set of function calls during package precompilation. As a Genie.jl app is a Julia project, I was wondering:

Is it possible to package a Genie.jl app as a package, and thereby use SnoopPrecompile.jl to make the app quick to launch? I am essentially looking for an autogenerated sysimage for the app.

In case it is not possible to package an app as a package, is there another way one could take advantage of SnoopPrecompile (or SnoopCompile) to get a similar outcome?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [April 7, 2023, 10:49am UTC](https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202/2 "2023-04-07T10:49:53Z")

</div>

As long as you create it as a “package,” then you can use SnoopPrecompile.

> [@Question about using SnoopPrecompile](https://discourse.julialang.org/t/question-about-using-snoopprecompile/88227/9):
>
> One opportunity that probably most people are still not exploiting: with 1.8, the precompile work does not have to be in the package that “owns” the code. So what that means is that each user can construct a “personal Startup.jl” package and say using Startup at the beginning of a new session. So for example, if you like to use a combination of CSV, DataFrames, and StatsModels and want certain things to be fast, then you can Pkg.generate("Startup") in your dev folder and then the Startup package…

---

<div class="post-metadata">

**Author:** ![TheLateKronos](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thelatekronos/32/12824_2.png) [@TheLateKronos](https://discourse.julialang.org/u/TheLateKronos)\
**Post date:** [April 7, 2023, 2:11pm UTC](https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202/3 "2023-04-07T14:11:10Z")

</div>

> [@tim.holy](#):
>
> As long as you create it as a “package,” then you can use SnoopPrecompile.

And that is my question exactly. It has a project.toml, and a manifest.toml, and is wrapped in a module. But I have not you seen the docs tell you to use Pkg to “add” it. So I am not sure if it possible, but I can not see what is missing. Is anything else needed to make it a “package”?

---

<div class="post-metadata">

**Author:** ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Post date:** [April 7, 2023, 7:51pm UTC](https://discourse.julialang.org/t/can-i-snoopprecompile-a-genie-jl-app/97202/4 "2023-04-07T19:51:07Z")

</div>

`pkg> dev MyFavoritePrecompiledModule` may be what you’re after. You can specify the whole path if it’s not in your `.julia/dev` folder.
