From 7967aeaa93748ad657d6fcb21caedc6e28e4eee6 Mon Sep 17 00:00:00 2001 From: Johannes Terblanche Date: Wed, 14 Aug 2024 14:21:16 +0200 Subject: [PATCH] loadDFG asyncmap --- src/FileDFG/services/FileDFG.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FileDFG/services/FileDFG.jl b/src/FileDFG/services/FileDFG.jl index 7e41ca0d..e6172d6f 100644 --- a/src/FileDFG/services/FileDFG.jl +++ b/src/FileDFG/services/FileDFG.jl @@ -168,7 +168,7 @@ function loadDFG!( varFiles = sort(readdir(varFolder; sort = false); lt = natural_lt) factorFiles = sort(readdir(factorFolder; sort = false); lt = natural_lt) - packedvars = @showprogress 1 "loading variables" map(varFiles) do varFile + packedvars = @showprogress 1 "loading variables" asyncmap(varFiles) do varFile jstr = read("$varFolder/$varFile", String) return JSON3.read(jstr, PackedVariable) end @@ -185,7 +185,7 @@ function loadDFG!( # Adding variables map(v -> addVariable!(dfgLoadInto, v), variables) - packedfacts = @showprogress 1 "loading factors" map(factorFiles) do factorFile + packedfacts = @showprogress 1 "loading factors" asyncmap(factorFiles) do factorFile jstr = read("$factorFolder/$factorFile", String) return JSON3.read(jstr, PackedFactor) end