Skip to content

[commandsv3] Performance improvement for schedule() - #9365

Open
Daniel1464 wants to merge 1 commit into
wpilibsuite:mainfrom
Daniel1464:delayGetStackTrace
Open

[commandsv3] Performance improvement for schedule()#9365
Daniel1464 wants to merge 1 commit into
wpilibsuite:mainfrom
Daniel1464:delayGetStackTrace

Conversation

@Daniel1464

Copy link
Copy Markdown
Contributor

Previously, Scheduler.schedule() would create a Throwable object and get its stack trace. This PR delays the getStackTrace() call to when an exception is actually thrown, which makes scheduling commands slightly faster.

@Daniel1464
Daniel1464 requested a review from a team as a code owner August 29, 2026 20:37
@github-actions github-actions Bot added the component: commands v3 WPILib Commands library version 3 label Aug 29, 2026
SamCarlberg
SamCarlberg previously approved these changes Aug 30, 2026
@SamCarlberg
SamCarlberg dismissed their stale review September 6, 2026 03:50

Constructing a Throwable already fills in the stack trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: commands v3 WPILib Commands library version 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants