Investigate long compile times

Hi,

Can someone give me hint on why the following call takes ~2mn to compile please? If you have an idea of the culprit and suggestions, I’d be very happy to hear them :smiley:

Thanks a lot for your help,

fold_po_coll = @time continuation(deepcopy(br_po), 1, (@optic _.c5), opts_pocoll_fold;
        detect_codim2_bifurcation = 0,
        jacobian_ma = :minaug,
        bdlinsolver = BorderingBLS(solver = DefaultLS(), check_precision = false),
        )

The function calls continuation_coll_fold and then the general continuation_fold. In comparison, calling the function continuation_coll_pd does not lead to large compiles times (~10s).

I know that I have closures in continuation_fold but this is true for continuation_pd and this does not seem to cause large compile times.

Below is a MWE to show the compile time:

using Revise
using BifurcationKit

function Fsl(u, p)
    (;r, μ, ν, c3, c5) = p
    u1, u2 = u
    f = similar(u)
    ua = u1^2 + u2^2
    f[1] = r * u1 - ν * u2 + ua * (c3 * u1 - μ * u2) + c5 * ua^2 * u1
    f[2] = r * u2 + ν * u1 + ua * (c3 * u2 + μ * u1) + c5 * ua^2 * u2
    return f
end

par_sl = (r = -0.5, μ = 0., ν = 1.0, c3 = 0.1, c5 = -0.01)
prob = BifurcationProblem(Fsl, [0., 0], par_sl, (@optic _.r))

opts = ContinuationPar(p_min = -1.)
br = continuation(prob, PALC(), opts)

# branch of periodic orbits
br_po = continuation(br, 1, opts,
        PeriodicOrbitOCollProblem(20, 4)
        )

# computation of folds of periodic orbits
opts_pocoll_fold = ContinuationPar(br_po.contparams, max_steps = 10, p_max=1.2)
fold_po_coll = @time continuation(deepcopy(br_po), 1, (@optic _.c5), opts_pocoll_fold;
        detect_codim2_bifurcation = 0,
        jacobian_ma = :minaug,
        bdlinsolver = BorderingBLS(solver = DefaultLS(), check_precision = false),
        )
1 Like

What is the output of

versioninfo()

?

julia> versioninfo()
Julia Version 1.10.5
Commit 6f3fdf7b362 (2024-08-27 14:19 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 12 × Apple M2 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 8 default, 0 interactive, 4 GC (on 8 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 8

When I run this on Ubuntu Linux on a Ryzen 7840u laptop I get:

julia> @eval @time include("mwe.jl")
┌ Warning: The guess for the amplitude of the first periodic orbit on the bifurcated branch obtained by the predictor is not small: 0.4472135954976816. This may lead to convergence failure of the first newton step or select a branch far from the Hopf point.
│ You can either decrease `ds` or `δp` (which is  how far from the bifurcation point you want the branch of periodic orbits to start). Alternatively, you can specify a multiplicative factor `ampfactor` to be applied to the predictor amplitude.
└ @ BifurcationKit ~/.julia/packages/BifurcationKit/KwA2l/src/periodicorbit/PeriodicOrbits.jl:413
 33.738423 seconds (28.05 M allocations: 1.998 GiB, 2.15% gc time, 99.53% compilation time)
 66.162634 seconds (92.21 M allocations: 6.284 GiB, 4.40% gc time, 98.12% compilation time: <1% of which was recompilation)
 ┌─ Curve type: FoldPeriodicOrbitCont
 ├─ Number of points: 11
 ├─ Type of vectors: BorderedArray{Vector{Float64}, Float64}
 ├─ Parameters (:r, :c5)
 ├─ Parameter c5 starts at -0.01, ends at -0.004444740574832257
 ├─ Algo: PALC
 └─ Special points:

- #  1, endpoint at c5 ≈ -0.00395615,                                                                     step =  11

Any suggestions how to get more insight on which tasks the compilation time is spent?

The compilation time is spent in the computation of fold_po_coll. If you copied my code in mwe.jl, there is only one @time in it, so I guess the 33s reported correspond to the long computation time I observe.

1 Like

The call itself takes 0.1s once compiled…

using Tools to Analyze Long Julia Compilation Times - #3 by SteffenPL, I chose to profile the first run. Here is what I get

I still dont understand what is causing the long compile time. I thought it was d2F so I changed the call to

continuation(deepcopy(br_po), 1, (@optic _.c5), opts_pocoll_fold;
        detect_codim2_bifurcation = 0,
        jacobian_ma = :minaug,
        bdlinsolver = BorderingBLS(solver = DefaultLS(), check_precision = false),
        usehessian = false,
        )

but now I get the following and I dont know how to progress

@ChrisRackauckas @tim.holy

You have some pretty big types. Here is one method that takes ~8 seconds to compile. I can’t actually post the full type since it hits the limit of the post length (below is just a small part):

#= 8111.2 ms =# precompile(Tuple{typeof(Core.kwcall), NamedTuple{(:linear_algo, :finalise_solution, :kind, :normC, :event), Tuple{BifurcationKit.BorderingBLS{BifurcationKit.FoldLinearSolverMinAug, Float64}, BifurcationKit.var"#update_minaug_fold#541"{BifurcationKit.var"#update_minaug_fold#535#542"{Float64, Int64, typeof(LinearAlgebra.norm), Base.Pairs{Symbol, BifurcationKit.Finaliser{BifurcationKit.FoldMAProblem{BifurcationKit.FoldProblemMinimallyAugmented{BifurcationKit.WrapPOColl{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, Nothing, Nothing, Nothing, Accessors.PropertyLens{:r}, Nothing, Nothing}, Float64, Float64, BifurcationKit.DefaultLS, BifurcationKit.DefaultLS, BifurcationKit.MatrixBLS{Nothing}, BifurcationKit.MatrixBLS{Nothing}, LinearAlgebra.UniformScaling{Bool}}, Nothing, Nothing, Nothing, Accessors.PropertyLens{:c5}, Nothing, Nothing}, Nothing}, Tuple{Symbol}, NamedTuple{(:finalise_solution,), Tuple{BifurcationKit.Finaliser{BifurcationKit.FoldMAProblem{BifurcationKit.FoldProblemMinimallyAugmented{BifurcationKit.WrapPOColl{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, Nothing, Nothing, Nothing, Accessors.PropertyLens{:r}, Nothing, Nothing}, Float64, Float64, BifurcationKit.DefaultLS, BifurcationKit.DefaultLS, BifurcationKit.MatrixBLS{Nothing}, BifurcationKit.MatrixBLS{Nothing}, LinearAlgebra.UniformScaling{Bool}}, Nothing, Nothing, Nothing, Accessors.PropertyLens{:c5}, Nothing, Nothing}, Nothing}}}}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, Accessors.PropertyLens{:c5}, BifurcationKit.FoldProblemMinimallyAugmented{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{BifurcationKit.var"#1661#1662"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#128#129"{BifurcationKit.var"#1661#1662"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}}, BifurcationKit.var"#1663#1664"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#1663#1664"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, BifurcationKit.SpecialPoint{Float64, NamedTuple{(:max, :min, :amplitude, :period), NTuple{4, Float64}}, Array{Float64, 1}, Array{Float64, 1}}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, BifurcationKit.var"#1657#1658"{BifurcationKit.var"#1659#1660"{BifurcationKit.Branch{BifurcationKit.PeriodicOrbitCont, BifurcationKit.WrapPOColl{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, BifurcationKit.var"#modify_po_plot##0#modify_po_plot##1"{BifurcationKit.var"#modify_po_plot##2#modify_po_plot##3"}, BifurcationKit.var"#modify_po_record##4#modify_po_record##5"{BifurcationKit.var"#modify_po_record##6#modify_po_record##7"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}}}}, BifurcationKit.ContResult{BifurcationKit.PeriodicOrbitCont, NamedTuple{(:max, :min, :amplitude, :period, :param, :itnewton, :itlinear, :ds, :n_unstable, :n_imag, :stable, :step), Tuple{Float64, Float64, Float64, Float64, Float64, Int64, Int64, Float64, Int64, Int64, Bool, Int64}}, Base.SubArray{Base.Complex{Float64}, 1, Array{Base.Complex{Float64}, 1}, Tuple{Base.SubArray{Int64, 1, Array{Int64, 1}, Tuple{Base.UnitRange{Int64}}, true}}, false}, Array{Base.Complex{Float64}, 2}, BifurcationKit.SpecialPoint{Float64, NamedTuple{(:max, :min, :amplitude, :period), NTuple{4, Float64}}, Array{Float64, 1}, Array{Float64, 1}}, Array{NamedTuple{(:x, :p, :step), Tuple{Array{Float64, 1}, Float64, Int64}}, 1}, BifurcationKit.ContinuationPar{Float64, BifurcationKit.FloquetWrapperLS{BifurcationKit.DefaultLS}, BifurcationKit.FloquetColl{BifurcationKit.DefaultEig{typeof(Base.abs)}}}, BifurcationKit.WrapPOColl{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, BifurcationKit.var"#modify_po_plot##0#modify_po_plot##1"{BifurcationKit.var"#modify_po_plot##2#modify_po_plot##3"}, BifurcationKit.var"#modify_po_record##4#modify_po_record##5"{BifurcationKit.var"#modify_po_record##6#modify_po_record##7"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}}}}, BifurcationKit.PALC{BifurcationKit.Secant, BifurcationKit.MatrixBLS{BifurcationKit.FloquetWrapperLS{Nothing}}, Float64, BifurcationKit.DotTheta{BifurcationKit.var"#DotTheta##0#DotTheta##1", BifurcationKit.var"#DotTheta##2#DotTheta##3"}}}, BifurcationKit.Hopf{Array{Float64, 1}, BifurcationKit.BorderedArray{Array{Float64, 1}, Float64}, Float64, Float64, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, Array{Base.Complex{Float64}, 1}, Array{Base.Complex{Float64}, 1}, NamedTuple{(:a, :b, :Ψ110, :Ψ001, :Ψ200), Tuple{Base.Complex{Float64}, Base.Complex{Float64}, Array{Base.Complex{Float64}, 1}, Array{Float64, 1}, Array{Base.Complex{Float64}, 1}}}}}}}, typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, Array{Float64, 1}, Float64, BifurcationKit.FloquetWrapperLS{BifurcationKit.DefaultLS}, BifurcationKit.FloquetWrapperLS{BifurcationKit.DefaultLS}, BifurcationKit.FloquetWrapperBLS{BifurcationKit.BorderingBLS{BifurcationKit.DefaultLS, Float64}}, BifurcationKit.FloquetWrapperBLS{BifurcationKit.BorderingBLS{BifurcationKit.DefaultLS, Float64}}, LinearAlgebra.UniformScaling{Bool}}}}, BifurcationKit.FoldPeriodicOrbitCont, typeof(LinearAlgebra.norm), BifurcationKit.PairOfEvents{BifurcationKit.ContinuousEvent{Base.ComposedFunction{typeof(BifurcationKit.convert_to_tuple_eve), BifurcationKit.var"#test_bt_cp#543"{Float64, typeof(LinearAlgebra.norm), NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, Accessors.PropertyLens{:c5}}}, Tuple{String, String}, Int64, typeof(BifurcationKit.default_finalise_event!), Nothing}, BifurcationKit.DiscreteEvent{Base.ComposedFunction{typeof(BifurcationKit.convert_to_tuple_eve), BifurcationKit.var"#test_zh#544"}, Tuple{String}, typeof(BifurcationKit.default_finalise_event!), Nothing}}}}, typeof(BifurcationKit.continuation), BifurcationKit.FoldMAProblem{BifurcationKit.FoldProblemMinimallyAugmented{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{BifurcationKit.var"#1661#1662"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#128#129"{BifurcationKit.var"#1661#1662"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#1273#1274"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}}, BifurcationKit.var"#1663#1664"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#1663#1664"{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, Array{Float64, 1}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, typeof(BifurcationKit.plot_default), typeof(BifurcationKit.record_sol_default), typeof(BifurcationKit.save_solution_default)}, BifurcationKit.DenseAnalytical, Array{Float64, 1}, Nothing, BifurcationKit.MeshCollocationCache{Float64}, BifurcationKit.POCollCache{Float64}}}, BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing}}, BifurcationKit.SpecialPoint{Float64, NamedTuple{(:max, :min, :amplitude, :period), NTuple{4, Float64}}, Array{Float64, 1}, Array{Float64, 1}}, NamedTuple{(:r, :μ, :ν, :c3, :c5), NTuple{5, Float64}}, Accessors.PropertyLens{:r}, BifurcationKit.var"#1657#1658"{BifurcationKit.var"#1659#1660"{BifurcationKit.Branch{BifurcationKit.PeriodicOrbitCont, BifurcationKit.WrapPOColl{BifurcationKit.PeriodicOrbitOCollProblem{BifurcationKit.BifurcationProblem{BifurcationKit.BifFunction{typeof(Main.Fsl), BifurcationKit.var"#128#129"{typeof(Main.Fsl)}, BifurcationKit.var"#136#137", Nothing, BifurcationKit.var"#130#131", Nothing, BifurcationKit.var"#134#135"{BifurcationKit.var"#130#131"}, BifurcationKit.var"#143#144"{BifurcationKit.var"#d1Fad#140"}, BifurcationKit.var"#147#148", BifurcationKit.var"#151#152", BifurcationKit.var"#155#156", Bool, Float64, BifurcationKit.Jet{Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, ...

Thanks a lot for looking at this! I have two questions if I may.

A question of method because I might use your workflow for other functions:

  • how did you get this ? What command? How can I use your hint?

A specific question to the problem:

I used --trace-compile=file.jl --trace-compile-timing on 1.12 (the 1.12-nightly juliaup channel), run the workload and look in file.jl.