Consider garbage collecting events from source to subscriber in Spider
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
No files or tests are named. Start by tracing the implementations of switch, the primitive combinators, Adjustable, and the incremental merge functions to understand their event-lifecycle bookkeeping. Done would mean a decided design and coverage showing that EventDead propagates when an event can no longer produce values, without breaking existing event propagation.
Written by the indexing model from the issue text.
Description
We currently unsubscribe from events when "no one is listening", but I think we could do something when "there's nothing to listen for". When an event becomes never via a switch, or from its trigger getting garbage collected, we could propagate an EventDead message. All primitive combinators would then optimize for this, doing the necessary bookkeeping to be able to propagate EventDead when they know they won't produce any more events.
I think this can be understood as "as GC is to manual memory management, so EventDead is to Adjustable"? (Or the incremental family of merge functions?)
Cost
Each event propagation has toDead-marking can happen in a side channel, just as height adjustment does.caseon the value.- ...
Advantages
- Write ever-accumulating merges without having to worry about bookkeeping.
- You could implement, using regular FRP code, optimizations for types like "join-semilattice with a top", which can never change once the top is reached.
- ...
- Dominant language
- Haskell
- Stars
- 1.1k
- Forks
- 150
- Avg merge
- 34m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-frp/reflex
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
reflex-frp/reflex#563 ·
-
Using monad transformer inside `Dynamic` monad is extremely slowMay be free again @parenthetical claimed this 54 days ago, and no pull request is open. Open
Difficulty 4/5 3-5 days Newbie friendliness 43/100
reflex-frp/reflex#553 · 4 comments · 1 assignee ·
-
Apply `style.hs` to `reflex` + `reflex-dom`May be free again @parenthetical claimed this 113 days ago, and no pull request is open. Open
reflex-frp/reflex#550 · 1 assignee ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
reflex-frp/reflex#538 ·
-
documentation Low Severity opinionated
Difficulty 5/5 Over a week Newbie friendliness 30/100
reflex-frp/reflex#534 · 1 reaction ·
All issues in reflex-frp/reflex
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
haskell/bytestring#730 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
seal-harness/seal-harness#399 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
fmidue/codeworld-tasks#124 ·
-
The codecov job never gets a runner on macos-26 and is cancelledPossibly taken @yegor256 claimed this 1 day ago. Openbug
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
objectionary/phino#2524 · 1 comment ·
Maintainers usually reply within 1 day