Skip to content

perf: Make the code for adding group peers non-recursive.#2927

Open
iphydf wants to merge 1 commit intoTokTok:masterfrom
iphydf:nonrec-add_to_closest
Open

perf: Make the code for adding group peers non-recursive.#2927
iphydf wants to merge 1 commit intoTokTok:masterfrom
iphydf:nonrec-add_to_closest

Conversation

@iphydf
Copy link
Copy Markdown
Member

@iphydf iphydf commented Nov 2, 2025

Replaces the recursive implementation of add_to_closest in with an equivalent iterative loop. This eliminates the risk of stack overflow during deep peer eviction chains.


This change is Reviewable

@iphydf iphydf added this to the v0.2.22 milestone Nov 2, 2025
@github-actions github-actions bot added the performance A code change that improves performance label Nov 2, 2025
@iphydf iphydf force-pushed the nonrec-add_to_closest branch 2 times, most recently from e0eb205 to 8e9a354 Compare November 3, 2025 00:18
@iphydf iphydf force-pushed the nonrec-add_to_closest branch from 8e9a354 to c8d3d35 Compare December 17, 2025 02:05
@iphydf iphydf force-pushed the nonrec-add_to_closest branch 2 times, most recently from c778946 to 381b3fb Compare January 1, 2026 15:52
Replaces the recursive implementation of add_to_closest in with an
equivalent iterative loop. This eliminates the risk of stack overflow
during deep peer eviction chains.
@iphydf iphydf marked this pull request as ready for review January 27, 2026 14:08
@iphydf iphydf force-pushed the nonrec-add_to_closest branch from 381b3fb to 9c4138f Compare January 27, 2026 14:16
@iphydf iphydf modified the milestones: v0.2.22, v0.2.23 Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance A code change that improves performance

Development

Successfully merging this pull request may close these issues.

1 participant