From fdf1dbd9cfa8fe4000caa36d9f1c82afeccd7b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kr=C3=BCger?= Date: Wed, 14 Mar 2018 12:29:00 +0100 Subject: [PATCH] Documentation improvement decode option copy_strings. --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 58fbc0f..c2200bc 100644 --- a/README.md +++ b/README.md @@ -52,12 +52,13 @@ The options for decode are: will ensure that the parsed object only contains a single entry containing the last value seen. This mirrors the parsing beahvior of virtually every other JSON parser. -* `copy_strings` - Normaly when strings are decoded they are created - as sub-binaries of the input data. With some workloads this can lead - to an undeseriable bloating of memory when a few small strings in JSON - keep a reference to the full JSON document alive. Setting this option - will instead allocate new binaries for each string to avoid keeping - the original JSON document around after garbage collection. +* `copy_strings` - Normally, when strings are decoded, they are + created as sub-binaries of the input data. With some workloads, this + leads to an undesirable bloating of memory: Strings in the decode + result keep a reference to the full JSON document alive. Setting + this option will instead allocate new binaries for each string, so + the original JSON document can be garbage collected even though + the decode result is still in use. * `{bytes_per_red, N}` where N >= 0 - This controls the number of bytes that Jiffy will process as an equivalent to a reduction. Each 20 reductions we consume 1% of our allocated time slice for the current