Is it normal for `include` to take a long time? I have a file, say `model.jl` that

Is it normal for include to take a long time? I have a file, say model.jl that includes only functions and the following header:

using DifferentialEquations
using Parameters
using Gnuplot
using CSV
using DataFrames
using LinearAlgebra
using ForwardDiff
using ProgressMeter
using DelimitedFiles

but include("model.jl") in a fresh julia takes about 48 - 60 seconds? Why does it take so long to simply bring functions into scope? I have no globals.

julia> @time include("model.jl")
 48.162177 seconds (89.10 M allocations: 4.882 GiB, 4.22% gc time)
ngm2 (generic function with 1 method)

where are all the allocations coming from?

Note that the original poster on Slack cannot see your response here on Discourse. Consider transcribing the appropriate answer back to Slack, or pinging the poster here on Discourse so they can follow this thread.
(Original message :slack:) (More Info)

@time begin
using DifferentialEquations
using Parameters
using Gnuplot
using CSV
using DataFrames
using LinearAlgebra
using ForwardDiff
using ProgressMeter
using DelimitedFiles
end

how long does this take in a fresh REPL?

1 Like