Skip to content

perf: [DSM-103] Avoid next_exeution() where possible#9727

Merged
alin-at-dfinity merged 3 commits intomasterfrom
alin/DSM-103-avoid-next_execution
Apr 7, 2026
Merged

perf: [DSM-103] Avoid next_exeution() where possible#9727
alin-at-dfinity merged 3 commits intomasterfrom
alin/DSM-103-avoid-next_execution

Conversation

@alin-at-dfinity
Copy link
Copy Markdown
Contributor

CanisterState::next_execution() is somewhat expensive, considering it is called in a lot of tight loops. It loons for low memory hook tasks and heartbeats/timers; and it checks canister input queues for messages.

In cases where we are only interested in paused/aborted executions/install code tasks, inspect directly TaskQueue::paused_or_aborted_task instead.

`CanisterState::next_execution()` is somewhat expensive, considering it is called in a lot of tight loops. It loons for low memory hook tasks and heartbeats/timers; and it checks canister input queues for messages.

In cases where we are only interested in paused/aborted executions/install code tasks, inspect directly `TaskQueue::paused_or_aborted_task` instead.
@alin-at-dfinity alin-at-dfinity requested a review from a team as a code owner April 3, 2026 18:13
@github-actions github-actions bot added the perf label Apr 3, 2026
@alin-at-dfinity alin-at-dfinity added this pull request to the merge queue Apr 7, 2026
Merged via the queue into master with commit b595754 Apr 7, 2026
63 of 64 checks passed
@alin-at-dfinity alin-at-dfinity deleted the alin/DSM-103-avoid-next_execution branch April 7, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants