# Extremely high first call latency Julia 1.6 versus 1.5 with multiphysics PDE solver

**URL:** <https://discourse.julialang.org/t/extremely-high-first-call-latency-julia-1-6-versus-1-5-with-multiphysics-pde-solver/71692>\
**Category:** Performance\
**Tags:** question\
**Created:** [November 17, 2021, 11:33pm UTC](https://discourse.julialang.org/t/extremely-high-first-call-latency-julia-1-6-versus-1-5-with-multiphysics-pde-solver/71692 "2021-11-17T23:33:43Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Post date:** [November 26, 2021, 12:40pm UTC](https://discourse.julialang.org/t/extremely-high-first-call-latency-julia-1-6-versus-1-5-with-multiphysics-pde-solver/71692/25 "2021-11-26T12:40:36Z")

</div>

I have an issue with compile time latency with a neural work in Julia 1.6 and 1.7-rc2 (compared to Julia 1.5) which might be related:

> [@Significant compile time latency in Flux with a GAN](https://discourse.julialang.org/t/significant-compile-time-latency-in-flux-with-a-gan/68518):
>
> I am trying to implement a [SRGAN](https://arxiv.org/abs/1609.04802) (super-resolution generative adversarial networks) in Flux (I am happy to share once it works… :-)) The generator network is composed of 5 residual blocks (function resblock below). Unfortunately the time of the first call of Zygote.pullback increases very quickly with the number of residual blocks, so that I am not able to use the 5 residual blocks as intended. I already commented out any elements-wise broadcasting (activation functions), but the issue is s…

If one uses the option -O1 the compile times are vastly reduced. When inspecting the run with callgrind to CPUs time is mostly spend in LLVM _even on the second call_ of the same function with the same arguments (using the default optimization level).

I tried to compile Julia from source changing the parameters `max_methods`, `tupletype_depth`, `tuple_splat`, `inline_tupleret_bonus` but without luck.

> <https://github.com/JuliaLang/julia/blob/master/base/compiler/types.jl#L69>

When I interrupt Julia during the excessive compilation, it seemed to be busy in the `DAGCombiner` phase of LLVM.

---

_[View the full topic](https://discourse.julialang.org/t/extremely-high-first-call-latency-julia-1-6-versus-1-5-with-multiphysics-pde-solver/71692)._
