Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: when zcfSeats exit or fail, delete objects holding cycles #8697

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

Chris-Hibbert
Copy link
Contributor

@Chris-Hibbert Chris-Hibbert commented Dec 28, 2023

refs: #8401
refs: #8672
refs: #8682

Description

Drop cyclic references to zcfSeats and seatHandles when seats exit so GC can collect more cycles.

in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js: state.zccfSeat = undefined

Security Considerations

N/A

Scaling Considerations

Vast improvement in reducing retained garbage.

Documentation Considerations

Not visible to users

Testing Considerations

No tests added. It would be very hard to demonstrate freed objects in a test.

Upgrade Considerations

This is intended to be part of a fairly large collection of updates to Zoe/ZCF.

in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js:    state.zccfSeat = undefined
@Chris-Hibbert Chris-Hibbert added Zoe package: Zoe performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks labels Dec 28, 2023
@Chris-Hibbert Chris-Hibbert self-assigned this Dec 28, 2023
Copy link
Member

@erights erights left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please merge this into the base PR still under review. Thanks!

@Chris-Hibbert Chris-Hibbert merged commit cdc16b8 into 8672-acyclicZoeSeatKit Jan 2, 2024
70 of 71 checks passed
@Chris-Hibbert Chris-Hibbert deleted the 8672-acyclicZcfSeatKit branch January 2, 2024 17:30
Chris-Hibbert added a commit that referenced this pull request Jan 2, 2024
in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js:    state.zccfSeat = undefined
@Chris-Hibbert Chris-Hibbert mentioned this pull request Feb 8, 2024
14 tasks
Chris-Hibbert added a commit that referenced this pull request Feb 28, 2024
in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js:    state.zccfSeat = undefined
Chris-Hibbert added a commit that referenced this pull request Feb 28, 2024
in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js:    state.zccfSeat = undefined
Chris-Hibbert added a commit that referenced this pull request Mar 1, 2024
in zcfSeat.js: zcfSeatToSeatHandle.delete(self)
in exit.js:    state.zccfSeat = undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Performance related issues resource-exhaustion Threats to availability from resource exhaustion attacks Zoe package: Zoe
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants