Skip to content

Commit 67287d9

Browse files
authored
Merge pull request #910 from JuliaRobotics/22Q4/perf/allowskipversion
kwarg to skip version checking on unpackVariable for performance
2 parents 9006126 + 025aabe commit 67287d9

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/services/Serialization.jl

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,18 @@ function _unpackVariableNodeData(
193193
end
194194

195195
# returns a DFGVariable
196-
function unpackVariable(dfg::AbstractDFG,
197-
packedProps::Dict{String, Any};
198-
unpackPPEs::Bool=true,
199-
unpackSolverData::Bool=true,
200-
unpackBigData::Bool = haskey(packedProps,"dataEntryType") && haskey(packedProps, "dataEntry")
201-
)
196+
function unpackVariable(
197+
dfg::AbstractDFG,
198+
packedProps::Dict{String, Any};
199+
unpackPPEs::Bool=true,
200+
unpackSolverData::Bool=true,
201+
unpackBigData::Bool = haskey(packedProps,"dataEntryType") && haskey(packedProps, "dataEntry"),
202+
skipVersionCheck::Bool=false,
203+
)
202204
#
203205
@debug "Unpacking variable:\r\n$packedProps"
204206
# Version checking.
205-
_versionCheck(packedProps)
207+
!skipVersionCheck && _versionCheck(packedProps)
206208
label = Symbol(packedProps["label"])
207209
# Make sure that the timestamp is correctly formatted with subseconds
208210
packedProps["timestamp"] = getStandardZDTString(packedProps["timestamp"])

0 commit comments

Comments
 (0)