notes.txt
This file
Path
notes.txt
117 lines · 7.4 KiB
Last changed by
Moving files into foldersMichel Weststratebefore adoptionab49edc
History of this fileTake it
Mangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd
lines 1–4why, one step back1Things to optimize23[x] extract errors4[x] don't enable all features by defaultSome minor cleanupMichel Weststratebefore adoption718b7f6
line 5why, one step back5[ ] "undefined" "object" "function" prototype undefined bind, getOwnPropertyies, isArray etc + buildin FNs ?killed hooks, as they leaked mangled properties. Also -145 bytesMichel Weststratebefore adoptionf1918cb
line 6why, one step back6[x] kill hooksMangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd
line 7why, one step back7[x] _ postfix all membersCleanup finalize, -57Michel Weststratebefore adoption530d81b
line 8why, one step back8[x] clean up finalizeSome notesMichel Weststratebefore adoption746dc6f
line 9why, one step back9[x] remove diePreserve error codes in productionMichel Weststratebefore adoptiond005fab
line 10why, one step back10[x] own invariantSome notesMichel Weststratebefore adoption746dc6f
lines 11–13why, one step back11[ ] update docs12[ ] plugin tests13[ ] check if we can create more local varsscramble plugin names, -56Michel Weststratebefore adoption037b474
line 14why, one step back14[x] verify performanceSome notesMichel Weststratebefore adoption746dc6f
line 15why, one step back15[ ] kill ownKeys?Killed enumerations -145 (!)Michel Weststratebefore adoptionfdc78db
line 16why, one step back16[x] kill enumerationsSome notesMichel Weststratebefore adoption746dc6f
line 17why, one step back17[ ] check todosSmall improvementsMichel Weststratebefore adoption712af5c
line 18why, one step back18[ ] kill marchChangesSweep recursive if possible and no perf impactCleanup finalize, -57Michel Weststratebefore adoption530d81b
line 19why, one step back19[ ] optimize each closures away? pass in additional args?Some minor cleanupMichel Weststratebefore adoption718b7f6
line 20why, one step back20[x] document performance tip: if externally added data is frozen, it doesn't recurse (also update related issue) #465Killed enumerations -145 (!)Michel Weststratebefore adoptionfdc78db
line 21why, one step back21[ ] put some invariants behind __DEV__Some minor cleanupMichel Weststratebefore adoption718b7f6
lines 22–24why, one step back22[x] check for plugin specific utils23[ ] bind util24[ ] eliminate switchesMangle properties, -114 bytesMichel Weststratebefore adoptionbfa7ddd
lines 25–66why, one step back2526Import size report for immer:27┌───────────────────────┬───────────┬────────────┬───────────┐28│ (index) │ just this │ cumulative │ increment │29├───────────────────────┼───────────┼────────────┼───────────┤30│ import * from 'immer' │ 6761 │ 0 │ 0 │31│ produce │ 4048 │ 4048 │ 0 │32│ enableES5 │ 4908 │ 4916 │ 868 │33│ enableMapSet │ 5007 │ 5769 │ 853 │34│ enablePatches │ 4836 │ 6544 │ 775 │35└───────────────────────┴───────────┴────────────┴───────────┘36(this report was generated by npmjs.com/package/import-size)3738---3940Extracted errors4142Import size report for immer:43┌───────────────────────┬───────────┬────────────┬───────────┐44│ (index) │ just this │ cumulative │ increment │45├───────────────────────┼───────────┼────────────┼───────────┤46│ import * from 'immer' │ 6271 │ 0 │ 0 │47│ produce │ 3727 │ 3727 │ 0 │48│ enableES5 │ 4516 │ 4524 │ 797 │49│ enableMapSet │ 4589 │ 5348 │ 824 │50│ enablePatches │ 4444 │ 6054 │ 706 │51└───────────────────────┴───────────┴────────────┴───────────┘52(this report was generated by npmjs.com/package/import-size)5354Mangled props:5556Import size report for immer:57┌───────────────────────┬───────────┬────────────┬───────────┐58│ (index) │ just this │ cumulative │ increment │59├───────────────────────┼───────────┼────────────┼───────────┤60│ import * from 'immer' │ 6132 │ 0 │ 0 │61│ produce │ 3613 │ 3613 │ 0 │62│ enableES5 │ 4420 │ 4428 │ 815 │63│ enableMapSet │ 4439 │ 5227 │ 799 │64│ enablePatches │ 4319 │ 5929 │ 702 │65└───────────────────────┴───────────┴────────────┴───────────┘66(this report was generated by npmjs.com/package/import-size)Some notesMichel Weststratebefore adoption746dc6f
lines 67–77why, one step back6768After hooks:[69 Import size report for immer:70┌───────────────────────┬───────────┬────────────┬───────────┐71│ (index) │ just this │ cumulative │ increment │72├───────────────────────┼───────────┼────────────┼───────────┤73│ import * from 'immer' │ 5983 │ 0 │ 0 │74│ produce │ 3454 │ 3454 │ 0 │75│ enableES5 │ 4270 │ 4278 │ 824 │76│ enableMapSet │ 4285 │ 5079 │ 801 │77│ enablePatches │ 4154 │ 5770 │ 691 │Cleanup finalize, -57Michel Weststratebefore adoption530d81b
lines 78–91why, one step back78└───────────────────────┴───────────┴────────────┴───────────┘79(this report was generated by npmjs.com/package/import-size)80]8182After finalize cleanup: [83 Import size report for immer:84┌───────────────────────┬───────────┬────────────┬───────────┐85│ (index) │ just this │ cumulative │ increment │86├───────────────────────┼───────────┼────────────┼───────────┤87│ import * from 'immer' │ 5911 │ 0 │ 0 │88│ produce │ 3397 │ 3397 │ 0 │89│ enableES5 │ 4199 │ 4208 │ 811 │90│ enableMapSet │ 4217 │ 5001 │ 793 │91│ enablePatches │ 4091 │ 5693 │ 692 │Some notesMichel Weststratebefore adoption746dc6f
lines 92–94why, one step back92└───────────────────────┴───────────┴────────────┴───────────┘93(this report was generated by npmjs.com/package/import-size)94]Killed enumerations -145 (!)Michel Weststratebefore adoptionfdc78db
lines 95–108why, one step back9596Killed enumerations: 9798Import size report for immer:99┌───────────────────────┬───────────┬────────────┬───────────┐100│ (index) │ just this │ cumulative │ increment │101├───────────────────────┼───────────┼────────────┼───────────┤102│ import * from 'immer' │ 5750 │ 0 │ 0 │103│ produce │ 3252 │ 3252 │ 0 │104│ enableES5 │ 4046 │ 4055 │ 803 │105│ enableMapSet │ 4071 │ 4847 │ 792 │106│ enablePatches │ 3936 │ 5528 │ 681 │107└───────────────────────┴───────────┴────────────┴───────────┘108(this report was generated by npmjs.com/package/import-size)scramble plugin names, -56Michel Weststratebefore adoption037b474
lines 109–111why, one step back109110Minimize plugin api's:111 3196Some minor cleanupMichel Weststratebefore adoption718b7f6
lines 112–114why, one step back112113add draft optimization1143199Preserve error codes in productionMichel Weststratebefore adoptiond005fab
lines 115–116why, one step back115116invariantMoving files into foldersMichel Weststratebefore adoptionab49edc
line 117why, one step back1173094