Skip to content

Commit 1908127

Browse files
committed
Update import size values
1 parent fc221cc commit 1908127

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

website/docs/installation.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The following features can be opt-in to:
3030

3131
| Feature | Description | Method to call |
3232
| --- | --- | --- |
33+
| [Array Methods optimization](./array-methods.md) | Optimizes array method handling for improved performance with array-heavy operations | `enableArrayMethods()` |
3334
| [ES2015 Map and Set support](./complex-objects.md) | To enable Immer to operate on the native `Map` and `Set` collections, enable this feature | `enableMapSet()` |
3435
| [JSON Patch support](./patches.mdx) | Immer can keep track of all the changes you make to draft objects. This can be useful for communicating changes using JSON patches | `enablePatches()` |
3536

@@ -56,17 +57,18 @@ expect(usersById_v1.get("michel").country).toBe("NL")
5657
expect(usersById_v2.get("michel").country).toBe("UK")
5758
```
5859

59-
Vanilla Immer kicks in at ~3KB gzipped. Every plugin that is enabled adds < 1 KB to that. The breakdown is as follows:
60+
Vanilla Immer kicks in at ~3KB gzipped. Every plugin that is enabled adds ~1-2 KB to that. The breakdown is as follows:
6061

6162
```
6263
Import size report for immer:
6364
┌───────────────────────┬───────────┬────────────┬───────────┐
64-
(index) │ just this │ cumulative │ increment │
65+
(index) │ just this │ cumulative │ increment │
6566
├───────────────────────┼───────────┼────────────┼───────────┤
66-
│ import * from 'immer' │ 5033 │ 0 │ 0 │
67-
│ produce │ 3324 │ 3324 │ 0 │
68-
│ enableMapSet │ 4030 │ 4039 │ 715 │
69-
│ enablePatches │ 4112 │ 4826 │ 787 │
67+
│ import * from 'immer' │ 6908 │ 0 │ 0 │
68+
│ produce │ 4183 │ 4183 │ 0 │
69+
│ enableMapSet │ 4971 │ 4980 │ 797 │
70+
│ enablePatches │ 5335 │ 6097 │ 1117 │
71+
│ enableArrayMethods │ 4768 │ 6659 │ 562 │
7072
└───────────────────────┴───────────┴────────────┴───────────┘
7173
(this report was generated by npmjs.com/package/import-size)
7274
```

0 commit comments

Comments
 (0)