3 ms·
If you're serializing and saving the entire object always - you don't need this extension. But if you're storing say, a 1K user profile, and most of the time y
by dvirsky 10y ago
If you're serializing and saving the entire object always - you don't need this extension.
But if you're storing say, a 1K user profile, and most of the time you just want to update the access time, or get some auth token - this both allows atomicity and speeds up what you are doing.
The bigger the JSON object is vs. the how small a piece you want to retrieve or manipulate - the more efficient this becomes.
Also, manipulating a field in a JSON object atomically is currently possible only with Lua scripts - and even then, Lua will have to parse, manipulate and serialize the entire object. Where as in this case, if you are just updating something - there is zero parsing and zero serialization going on in the module.