diff --git a/docs/performance.md b/docs/performance.md index 7c679d9f..7947d7b6 100644 --- a/docs/performance.md +++ b/docs/performance.md @@ -44,7 +44,7 @@ Most important observation: ### Pre-freeze data -When adding a large data set to the state tree in an Immer producer (for example data received from a JSON endpoint), it is worth to call `freeze(json)` on the root of the data to be added first. This will allow Immer to add the new data to the tree faster, as it will skip _recursively_ freezing it, or searching the new data for any changes (drafts) that might be made. +When adding a large data set to the state tree in an Immer producer (for example data received from a JSON endpoint), it is worth to call `freeze(json)` on the root of the data that is being added first. To _shallowly_ freeze it. This will allow Immer to add the new data to the tree faster, as it will avoid the need to _recursively_ scan and freeze the new data. ### You can always opt-out diff --git a/src/core/immerClass.ts b/src/core/immerClass.ts index 3e1c53df..f98d3756 100644 --- a/src/core/immerClass.ts +++ b/src/core/immerClass.ts @@ -164,7 +164,7 @@ export class Immer implements ProducersFns { /** * Pass true to automatically freeze all copies created by Immer. * - * By default, auto-freezing is disabled in production. + * By default, auto-freezing is enabled. */ setAutoFreeze(value: boolean) { this.autoFreeze_ = value