# Background

In Gridap.jl, we have experienced a significant increase in compile times when moving from Julia 1.5 to Julia 1.6. To illustrate this, consider this example:

```
using Gridap
function main()
domain = (0,1,0,1,0,1); cells = (3,3,3); k = 2
γ = 10; h = 1/3
model = simplexify(CartesianDiscreteModel(domain,cells))
reffe = ReferenceFE(lagrangian,Float64,k)
V = TestFESpace(model,reffe,dirichlet_tags="boundary")
U = TrialFESpace(V)
Ω = Triangulation(model)
Γ = BoundaryTriangulation(model)
Λ = SkeletonTriangulation(model)
dΩ = Measure(Ω,2*k)
dΓ = Measure(Γ,2*k)
dΛ = Measure(Λ,2*k)
n_Γ = get_normal_vector(Γ)
n_Λ = get_normal_vector(Λ)
a(u,v) = ∫( ∇(v)⋅∇(u) )dΩ +
∫( (γ/h)*v*u - v*(n_Γ⋅∇(u)) - (n_Γ⋅∇(v))*u )dΓ +
∫( (γ/h)*jump(v*n_Λ)⋅jump(u*n_Λ) -
jump(v*n_Λ)⋅mean(∇(u)) -
mean(∇(v))⋅jump(u*n_Λ) )dΛ
l(v) = ∫( v )dΩ
op = AffineFEOperator(a,l,U,V)
uh = solve(op)
end
```

Calling

```
@time main()
```

takes 92.353941 (Julia 1.5) vs 221.752225 (Julia 1.6) in a fresh session. So 2.4x increase. This is a major problem for us since 92 seconds was already a long compilation time.

I believe that Julia (i.e. inference time) is not to blame for the sudden increase. By running this in Julia 1.6:

```
julia> using SnoopCompile
julia> tinf = @snoopi_deep main()
InferenceTimingNode: 165.115502/226.610818 on InferenceFrameInfo for Core.Compiler.Timings.ROOT() with 1385 direct children
```

I get that 226.61081 is total compile time and 165.115502 is time in all phases except inference. Thus, inference time alone (61 seconds) does not explain the increase.

# Question

Which actions we need to take to cut down the compile time that does not come from inference?

SnoopCompile Has a very nice tutorial on how to cut down inference times, but how to cut other phases?

We are looking forward for help since this is a major issue for us!

Thanks!