Skip to content
Myr

notes.txt

This file

Path

notes.txt

78 lines · 5.0 KiB

Last changed by

Cleanup. Don't recurse into frozen data structuresMichel Weststratebefore adoptiond32cb97

History of this file

Take it

Mangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd

lines 1–4why, one step back
1Things to optimize
23[x] extract errors4[x] don't enable all features by default

Some notesMichel Weststratebefore adoption746dc6f

line 5why, one step back
5[ ] "undefined" "object" "function" prototype undefined + buildin FNs ?

killed hooks, as they leaked mangled properties. Also -145 bytesMichel Weststratebefore adoptionf1918cb

line 6why, one step back
6[x] kill hooks

Mangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd

lines 7–8why, one step back
7[x] _ postfix all members
8[ ] clean up finalize

Some notesMichel Weststratebefore adoption746dc6f

lines 9–18why, one step back
9[x] remove die
10[ ] own invariant11[ ] optimize enumerations12[ ] update docs13[ ] plugin tests14[ ] check if we can create more local vars15[ ] verify performance16[ ] kill ownKeys?17[ ] kill isEnumerable?18[ ] check todos

Small improvementsMichel Weststratebefore adoption712af5c

lines 19–20why, one step back
19[ ] kill marchChangesSweep recursive if possible and no perf impact
20[ ] todo try immer perf on really big tree

Initial finalize cleanupMichel Weststratebefore adoption67ab3ab

line 21why, one step back
21[ ] optimize each closures away?

Cleanup. Don't recurse into frozen data structuresMichel Weststratebefore adoptiond32cb97

line 22why, one step back
22[ ] document performance tip: if externally added data is frozen, it doesn't recurse (also update related issue)

Mangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd

lines 23–64why, one step back
23
24Import size report for immer:25┌───────────────────────┬───────────┬────────────┬───────────┐26│ (index) │ just this │ cumulative │ increment │27├───────────────────────┼───────────┼────────────┼───────────┤28│ import * from 'immer' │ 6761 │ 0 │ 0 │29│ produce │ 4048 │ 4048 │ 0 │30│ enableES5 │ 4908 │ 4916 │ 868 │31│ enableMapSet │ 5007 │ 5769 │ 853 │32│ enablePatches │ 4836 │ 6544 │ 775 │33└───────────────────────┴───────────┴────────────┴───────────┘34(this report was generated by npmjs.com/package/import-size)3536---3738Extracted errors3940Import size report for immer:41┌───────────────────────┬───────────┬────────────┬───────────┐42│ (index) │ just this │ cumulative │ increment │43├───────────────────────┼───────────┼────────────┼───────────┤44│ import * from 'immer' │ 6271 │ 0 │ 0 │45│ produce │ 3727 │ 3727 │ 0 │46│ enableES5 │ 4516 │ 4524 │ 797 │47│ enableMapSet │ 4589 │ 5348 │ 824 │48│ enablePatches │ 4444 │ 6054 │ 706 │49└───────────────────────┴───────────┴────────────┴───────────┘50(this report was generated by npmjs.com/package/import-size)5152Mangled props:5354Import size report for immer:55┌───────────────────────┬───────────┬────────────┬───────────┐56│ (index) │ just this │ cumulative │ increment │57├───────────────────────┼───────────┼────────────┼───────────┤58│ import * from 'immer' │ 6132 │ 0 │ 0 │59│ produce │ 3613 │ 3613 │ 0 │60│ enableES5 │ 4420 │ 4428 │ 815 │61│ enableMapSet │ 4439 │ 5227 │ 799 │62│ enablePatches │ 4319 │ 5929 │ 702 │63└───────────────────────┴───────────┴────────────┴───────────┘64(this report was generated by npmjs.com/package/import-size)

Some notesMichel Weststratebefore adoption746dc6f

lines 65–78why, one step back
65
66After hooks:[67 Import size report for immer:68┌───────────────────────┬───────────┬────────────┬───────────┐69│ (index) │ just this │ cumulative │ increment │70├───────────────────────┼───────────┼────────────┼───────────┤71│ import * from 'immer' │ 5983 │ 0 │ 0 │72│ produce │ 3454 │ 3454 │ 0 │73│ enableES5 │ 4270 │ 4278 │ 824 │74│ enableMapSet │ 4285 │ 5079 │ 801 │75│ enablePatches │ 4154 │ 5770 │ 691 │76└───────────────────────┴───────────┴────────────┴───────────┘77(this report was generated by npmjs.com/package/import-size)78]