Repository navigation
fix(memory): release transient reply animations - #1170
Open
kogekiplay wants to merge 1 commit into
Open
kogekiplay wants to merge 1 commit into
kogekiplay wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replies that change layout create transient Web Animations for glides and fades. On the affected WebKit build, a finished
Animationcan remain native pending activity. A glide's anonymousfinishlistener also captures its element, so that animation keeps a removed message-view tree reachable after the tab closes. Fade-ins previously had no terminal release at all.Release these private, non-replayed animations on either
finishorcancel: remove both terminal listeners, clear only the matching glide entry, then detachanimation.timeline. Clearing only the matching entry preserves a replacement when an older cancellation event arrives late. This covers the custom reply glide/fade ownership boundary.WebKit bug 329512 reports the native pending-activity behavior and timeline-detachment workaround. The local macOS 27.2.1 host uses the same tested WebKit build,
22625.2.8.11.9. That report corroborates the native root; this investigation did not capture a C++ heap graph.A bounded native WKWebView fixture exercised the current full MessageList/runtime lifecycle with generated data: three replies, 96 lines each, 720 serial native deltas, 730 injected scripts / 726 distinct texts, animation on/off/on, then normal unmount and natural idle. The frozen baseline and candidate used identical workload and weak registration instrumentation; only the transient reply-animation lifecycle changed. Both were visible and unfocused, with no forced GC, allocation pressure, user database, live agent, debugger, or heap snapshot.
The two baseline callbacks resolve to
glide → play → componentDidUpdateand capture the removed elements. A preceding full-view run without the ownership instrumentation also ended with two surviving hosts. Registration tracking held only weak targets/callbacks and recorded no capacity drops. Natural collection timing is uncontrolled; this is a scoped reachability/lifecycle result, not a retained-byte or long-term repair benchmark. Physical totals were similar.Validation on current official
main(bd88b9dac0417057342fca13234b9c19a8b8093d):The original production WebContent long-term growth is still under investigation. This PR establishes and repairs the transient-animation host-retention path; it does not claim every cache, native allocation, tool/preview workload, or long-running session is covered. Real desktop integration and post-restart observation will be recorded separately.