From da8d6227d792214aa0481ca6a5ef69fd1f9a4c27 Mon Sep 17 00:00:00 2001 From: sl-solution Date: Fri, 19 May 2023 17:21:08 +1200 Subject: [PATCH] change precompilation --- src/InMemoryDatasets.jl | 2 +- src/precompile/precompile.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/InMemoryDatasets.jl b/src/InMemoryDatasets.jl index 5159ce1..afbda55 100644 --- a/src/InMemoryDatasets.jl +++ b/src/InMemoryDatasets.jl @@ -198,7 +198,7 @@ include("precompile/precompile.jl") include("precompile/warmup.jl") include("precompile/create_sysimage.jl") # FIXME currently v1.9.0 precompilation and loading cause an enormous amount of allocation - v1.10 seems ok -VERSION != v"1.9.0" && _precompile() +_precompile() function __init__() if Threads.nthreads() == 1 diff --git a/src/precompile/precompile.jl b/src/precompile/precompile.jl index 51f62c7..b0f5497 100644 --- a/src/precompile/precompile.jl +++ b/src/precompile/precompile.jl @@ -546,6 +546,8 @@ function _precompile() Base.precompile(Tuple{Core.kwftype(typeof(transpose)),NamedTuple{(:id, :threads), Tuple{Symbol, Bool}},typeof(transpose),Dataset,Vector{Symbol}}) Base.precompile(Tuple{Core.kwftype(typeof(transpose)),NamedTuple{(:threads,), Tuple{Bool}},typeof(transpose),Dataset,UnitRange{Int64}}) Base.precompile(Tuple{Core.kwftype(typeof(transpose)),NamedTuple{(:threads,), Tuple{Bool}},typeof(transpose),GroupBy,Vector{Int64}}) + Base.precompile(Tuple{Core.kwftype(typeof(flatten!)),NamedTuple{(:threads,), Tuple{Bool}},typeof(transpose),Dataset,UnitRange{Int64}}) + Base.precompile(Tuple{Core.kwftype(typeof(flatten!)),NamedTuple{(:threads,), Tuple{Bool}},typeof(transpose),Dataset,Int}) VERSION >= v"1.9" && IMD.warmup() return nothing end \ No newline at end of file