Skip to content

Commit

Permalink
Merge pull request #1088 from JuliaRobotics/LoadDFG_async
Browse files Browse the repository at this point in the history
loadDFG asyncmap
  • Loading branch information
Affie authored Aug 14, 2024
2 parents 26c9149 + 7967aea commit 80f4295
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FileDFG/services/FileDFG.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 80f4295

Please sign in to comment.