Skip to content

Amortized invalidator-list pruning with doubling threshold#535

Merged
parenthetical merged 1 commit into
developfrom
aidylns/issue-490-fix-space-leak-amortized
Jun 30, 2026
Merged

Amortized invalidator-list pruning with doubling threshold#535
parenthetical merged 1 commit into
developfrom
aidylns/issue-490-fix-space-leak-amortized

Conversation

@parenthetical

Copy link
Copy Markdown
Contributor

Fixes #490, enables the behaviorLeak test, adds a benchmark for large invalidator lists.

@parenthetical parenthetical force-pushed the aidylns/issue-490-fix-space-leak-amortized branch from 5365d26 to d49157a Compare June 26, 2026 22:47
@parenthetical

parenthetical commented Jun 27, 2026

Copy link
Copy Markdown
Contributor Author

I've benchmarked this and the worst tests show about a 10% overhead, so I'm inclined to merge this. I'm unsure whether invalidatorPruneThreshold = 100 is a reasonable choice (or how to know what the reasonable choice is) but we can make it configurable later if needed.

@ali-abrar

Copy link
Copy Markdown
Member

I'm running my leaktest in reflex-vty with this patch

@ali-abrar

Copy link
Copy Markdown
Member

Looks pretty good in my test.

@parenthetical parenthetical force-pushed the aidylns/issue-490-fix-space-leak-amortized branch 2 times, most recently from 1ad2415 to 08a219f Compare June 30, 2026 08:33
@parenthetical parenthetical force-pushed the aidylns/issue-490-fix-space-leak-amortized branch from 08a219f to 37c4413 Compare June 30, 2026 11:30
@parenthetical parenthetical merged commit 5e5ef44 into develop Jun 30, 2026
22 of 38 checks passed
@ali-abrar

Copy link
Copy Markdown
Member

hackage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Space leak when using the Applicative instance of Behavior

2 participants