Skip to content

Conversation

ktabouguia-sq
Copy link
Collaborator

@ktabouguia-sq ktabouguia-sq commented Jul 14, 2025

Description

AsyncTimeout currently manages timeouts in a linked list structure. This change adds a minHeap implementation for managing timeout nodes with improved runtime performance. Initial performance is looking great for node size > 100.

Before:

Benchmark                        (queueSize)  Mode  Cnt     Score     Error  Units
AsyncTimeoutBenchmark.enterExit            1  avgt    3    45.057 ±  23.819  ns/op
AsyncTimeoutBenchmark.enterExit           10  avgt    3    46.902 ±  16.235  ns/op
AsyncTimeoutBenchmark.enterExit          100  avgt    3   232.510 ±  32.140  ns/op
AsyncTimeoutBenchmark.enterExit         1000  avgt    3  1740.299 ± 204.767  ns/op

After:

Benchmark                        (queueSize)  Mode  Cnt   Score    Error  Units
AsyncTimeoutBenchmark.enterExit            1  avgt    3  41.632 ± 13.292  ns/op
AsyncTimeoutBenchmark.enterExit           10  avgt    3  48.848 ±  7.166  ns/op
AsyncTimeoutBenchmark.enterExit          100  avgt    3  50.082 ±  4.007  ns/op
AsyncTimeoutBenchmark.enterExit         1000  avgt    3  41.922 ±  1.324  ns/op

@ktabouguia-sq ktabouguia-sq requested review from jessemartin and squarejesse and removed request for jessemartin July 14, 2025 02:47
@ktabouguia-sq ktabouguia-sq force-pushed the ktabouguia/ktabouguia-asycnc-timeout-heap branch from 10eabc6 to 5957e00 Compare July 14, 2025 02:56
@ktabouguia-sq ktabouguia-sq marked this pull request as ready for review July 14, 2025 14:22
@swankjesse swankjesse enabled auto-merge (squash) July 23, 2025 14:35
@swankjesse swankjesse merged commit 0e48b0d into master Jul 23, 2025
21 of 22 checks passed
@swankjesse swankjesse deleted the ktabouguia/ktabouguia-asycnc-timeout-heap branch July 23, 2025 15:55
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.

3 participants