Skip to content

Commit c3f8eda

Browse files
committed
adding SnoopPrecompile for faster load times
1 parent 666fb82 commit c3f8eda

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3535
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
3636
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
3737
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
38+
SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
3839
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
3940
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
4041
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
@@ -68,11 +69,12 @@ ProgressMeter = "1"
6869
RecursiveArrayTools = "2.31.1"
6970
Reexport = "1"
7071
Requires = "1"
72+
SnoopPrecompile = "1"
7173
StaticArrays = "1"
7274
StatsBase = "0.32, 0.33"
7375
TensorCast = "0.3.3, 0.4"
7476
TimeZones = "1.3.1"
75-
julia = "1.6"
77+
julia = "1.8"
7678

7779
[extras]
7880
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"

src/IncrementalInference.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ using ManifoldsBase
5252

5353
# for BayesTree
5454
using MetaGraphs
55-
5655
using Logging
56+
using SnoopPrecompile
5757

5858
# bringing in BSD 3-clause ccolamd
5959
include("ccolamd.jl")
@@ -246,6 +246,15 @@ function __init__()
246246
end
247247
end
248248

249+
@precompile_all_calls begin
250+
# In here put "toy workloads" that exercise the code you want to precompile
251+
fg = generateGraph_Kaess()
252+
initAll!(fg)
253+
solveGraph!(fg)
254+
initParametricFrom!(fg, :default)
255+
solveGraphParametric!(fg)
256+
end
257+
249258
export setSerializationNamespace!, getSerializationModule, getSerializationModules
250259

251260
end

0 commit comments

Comments
 (0)