# Slow static compilation, large binaries (SnoopCompile/PackageCompiler)

**URL:** <https://discourse.julialang.org/t/slow-static-compilation-large-binaries-snoopcompile-packagecompiler/16450>\
**Category:** General Usage\
**Created:** [October 17, 2018, 4:25pm UTC](https://discourse.julialang.org/t/slow-static-compilation-large-binaries-snoopcompile-packagecompiler/16450 "2018-10-17T16:25:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhazeghi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dhazeghi/32/7107_2.png) [@dhazeghi](https://discourse.julialang.org/u/dhazeghi)\
**Post date:** [October 17, 2018, 4:25pm UTC](https://discourse.julialang.org/t/slow-static-compilation-large-binaries-snoopcompile-packagecompiler/16450/1 "2018-10-17T16:25:49Z")

</div>

We’re using PackageCompiler (on Julia 0.6.3) to generate binaries for a couple of tools that we will be deploying. Even though the package we’re building is pretty modest (a few hundred lines of code, dependencies on 3 other packages outside of base), the image that is built is huge (.so is ~100MB) and it takes quite a while to build.

PackageCompiler claims to find 28k+ uncompiled methods, and ends up taking 5 minutes+ to build. Is there any way to speed this up?

Also, the build is single-threaded/single-process and when I tried to do multiple builds at the same time, SnoopCompile failed. Any ideas to work around this would be much appreciated! Thanks.

2018-10-16T17:41:59 INFO 55 Compiling julia in directory: /tmp/build20181016-174159ViDz0T  
2018-10-16T17:41:59 INFO 56 Compiling julia in directory: /tmp/build20181016-174159lNC1nA  
2018-10-16T17:41:59 INFO 57 Compiling julia in directory: /tmp/build20181016-1741596Z\_lZX  
WARNING: Module SnoopCompile uuid did not match cache file.  
WARNING: Module SnoopCompile uuid did not match cache file.  
ERROR: LoadError: ERROR: LoadError: Module PackageCompiler declares **precompile** (true) but require failed to create a usable precompiled cache file.Module PackageCompiler declares **precompile** (true) but require failed to create a usable precompiled cache file.

---

<div class="post-metadata">

**Author:** ![dhazeghi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dhazeghi/32/7107_2.png) [@dhazeghi](https://discourse.julialang.org/u/dhazeghi)\
**Post date:** [November 2, 2018, 4:16pm UTC](https://discourse.julialang.org/t/slow-static-compilation-large-binaries-snoopcompile-packagecompiler/16450/2 "2018-11-02T16:16:23Z")

</div>

If it would help, I can generate a small MWE but my impression is that this is a general issue - e.g. a simple wrapper around the ZMQ library takes basically as long to build as a full-sized applications (and the resulting binary is almost as large).
