Skip to content

Commit

Permalink
Merge pull request #161 from preactjs/setless-core
Browse files Browse the repository at this point in the history
Reimplement the core without Sets, Maps, etc.
  • Loading branch information
marvinhagemeister authored Sep 16, 2022
2 parents e16eedf + 6ac6923 commit 40e31e8
Show file tree
Hide file tree
Showing 9 changed files with 1,109 additions and 380 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-turkeys-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@preact/signals-core": minor
---

Add support for auto-disposing nested effects
7 changes: 7 additions & 0 deletions .changeset/shiny-jars-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@preact/signals-core": patch
"@preact/signals": patch
"@preact/signals-react": patch
---

Remove all usages of `Set`, `Map` and other allocation heavy objects in signals-core. This substaintially increases performance across all measurements.
41 changes: 30 additions & 11 deletions mangle.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,36 @@
"props": {
"cname": 6,
"props": {
"$_value": "_v",
"$_deps": "_d",
"$_subs": "_s",
"$_pending": "_p",
"$_updater": "_u",
"$_setCurrent": "_",
"$_activate": "_a",
"$_isComputing": "_c",
"$_readonly": "_r",
"$_requiresUpdate": "_q",
"$_props": "__"
"core: Node": "",
"$_source": "s",
"$_prevSource": "p",
"$_nextSource": "n",
"$_target": "t",
"$_prevTarget": "e",
"$_nextTarget": "x",
"$_rollbackNode": "r",
"core: Signal": "",
"$_value": "v",
"$_node": "n",
"$_targets": "t",
"core: Computed": "",
"$_compute": "v",
"$_globalVersion": "g",
"core: Effect": "",
"$_callback": "c",
"$_nextEffect": "e",
"$_start": "S",
"$_dispose": "d",
"core: Computed+Effect": "",
"$_sources": "s",
"$_notify": "N",
"core: Signal+Node+Computed+Effect": "",
"$_flags": "f",
"$_version": "i",
"$_subscribe": "S",
"$_unsubscribe": "U",
"preact": "",
"$_updaters": "U"
}
}
}
Loading

0 comments on commit 40e31e8

Please sign in to comment.