# Is there an easy way to precompile functions without running them?

**URL:** <https://discourse.julialang.org/t/is-there-an-easy-way-to-precompile-functions-without-running-them/87831>\
**Category:** General Usage\
**Created:** [September 26, 2022, 6:37pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-precompile-functions-without-running-them/87831 "2022-09-26T18:37:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ronis\_BR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ronis_br/32/50999_2.png) [@Ronis\_BR](https://discourse.julialang.org/u/Ronis_BR)\
**Post date:** [September 26, 2022, 6:37pm UTC](https://discourse.julialang.org/t/is-there-an-easy-way-to-precompile-functions-without-running-them/87831/1 "2022-09-26T18:37:43Z")

</div>

Hi!

I have a package that has an interface with a database. I want that all functions get precompiled, but I cannot use SnoopCompile, for example, since it requires to actually run the functions. It is not possible here because we need a working database connection, which might not be available when generating the precompilation statements.

What I am doing is calling `precompile` using the argument types in each function. It works fine, but it is very difficult to create the statements for functions with keyword arguments.

Question: Is there a way to perform this precompilation without running the functions in an easy way as in SnoopCompile?
