You are not logged in.
I know TDocVariant.NewFast is faster, but I'm still not very sure about when to use TDocVariant.NewFast or TDocVariant.New.
From the manual:
- by default, every internal value will be copied, so access of nested properties can be slow - if
you expect the data to be read-only or not propagated into another place, set
Options=[dvoValueCopiedByReference] will increase the process speed a lot
- in practice, you should better use _Obj()/_ObjFast() _Arr()/_ArrFast() functions or
TDocVariant.NewFast()
The obscure part is this:
if you expect the data to be read-only or not propagated into another place...
My json is not read-only, but what does "not propagated into another place" mean?
Thanks.
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
It means that if you create a copy of the TDocVariant, in another variant variable for instance, and then you modify this other instance, then the first instance will also be modified.
The documentation shows this "propagation" of the modifications.
Offline