# How to help reduce package load latency?

**URL:** <https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294>\
**Category:** New to Julia\
**Created:** [October 23, 2023, 12:24am UTC](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294 "2023-10-23T00:24:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![orebas](https://avatars.discourse-cdn.com/v4/letter/o/bbe5ce/32.png) [@orebas](https://discourse.julialang.org/u/orebas)\
**Post date:** [October 23, 2023, 12:24am UTC](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294/1 "2023-10-23T00:24:34Z")

</div>

In an effort to reduce package load latency for a slow loading package,I successfully added some precompilation (via @compile\_workload) and it had the desired effect.

However, some dependencies are very slow as well, and I would like to learn how to help with that. The output of @time\_imports using ParameterEstimation includes the following

```julia
  12852.5 ms Polymake 24.84% compilation time (89% recompilation)
   5354.2 ms GAP 17.17% compilation time (83% recompilation)
   5574.2 ms Hecke 41.18% compilation time (79% recompilation)
4183.0 ms Oscar 62.59% compilation time (40% recompilation)
   9205.1 ms ParameterEstimation

```

I started to try to learn about SnoopPrecompile, but it says it is deprecated. So, questions,

1. Is the hope that all “compilation time” and “recompilation time” could in theory be eliminated by precompilation?
2. Is there a relatively easy way for someone who is not the primary package developer to add this precompilation?
3. Is this possible even if one is not at all familiar with the package itself and has never directly used it?
4. Is there a recommended workflow that reflects recent changes in 1.9 and maybe 1.10? I found [Analyzing sources of compiler latency in Julia: method invalidations](https://julialang.org/blog/2020/08/invalidations/) but this predates caching of native code.

Thanks all.

---

_[View the full topic](https://discourse.julialang.org/t/how-to-help-reduce-package-load-latency/105294)._
