Skip to content

Commit db68570

Browse files
committed
make copyGraph faster
1 parent 5309143 commit db68570

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/services/AbstractDFG.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ function copyGraph!(destDFG::AbstractDFG,
950950
copyGraphMetadata::Bool=false,
951951
overwriteDest::Bool=false,
952952
deepcopyNodes::Bool=false,
953-
verbose::Bool = true)
953+
verbose::Bool = false)
954954
# Split into variables and factors
955955
sourceVariables = map(vId->getVariable(sourceDFG, vId), variableLabels)
956956
sourceFactors = map(fId->getFactor(sourceDFG, fId), factorLabels)

src/services/Serialization.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525
function _versionCheck(props::Dict{String, Any})
2626
if haskey(props, "_version")
2727
if props["_version"] != _getDFGVersion()
28-
@warn "This data was serialized using DFG $(props["_version"]) but you have $(_getDFGVersion()) installed, there may be deserialization issues."
28+
@warn "This data was serialized using DFG $(props["_version"]) but you have $(_getDFGVersion()) installed, there may be deserialization issues." maxlog=10
2929
end
3030
else
3131
@warn "There isn't a version tag in this data so it's older than v0.10, there may be deserialization issues."
@@ -442,9 +442,13 @@ end
442442

443443

444444
# Returns `::DFGFactor`
445-
function unpackFactor(dfg::G, packedProps::Dict{String, Any}) where G <: AbstractDFG
445+
function unpackFactor(
446+
dfg::G,
447+
packedProps::Dict{String, Any};
448+
skipVerionCheck::Bool=false
449+
) where G <: AbstractDFG
446450
# Version checking.
447-
_versionCheck(packedProps)
451+
!skipVersionCheck && _versionCheck(packedProps)
448452

449453
label = packedProps["label"]
450454
# Make sure that the timestamp is correctly formatted with subseconds

0 commit comments

Comments
 (0)