Skip to content

feat(utils): precise_sleep() less CPU hungry without sacrificing accuracy#2526

Merged
imstevenpmwork merged 1 commit into
mainfrom
feat/better_busy_wait
Nov 26, 2025
Merged

feat(utils): precise_sleep() less CPU hungry without sacrificing accuracy#2526
imstevenpmwork merged 1 commit into
mainfrom
feat/better_busy_wait

Conversation

@imstevenpmwork

@imstevenpmwork imstevenpmwork commented Nov 26, 2025

Copy link
Copy Markdown
Collaborator

Replace full busy-spin with a platform-aware hybrid sleep+spin implementation (precise_sleep). On macOS/Windows it sleeps until near the deadline then spins for the final window; on Linux it defers to time.sleep.

@imstevenpmwork imstevenpmwork self-assigned this Nov 26, 2025
@imstevenpmwork imstevenpmwork added performance Issues aimed at improving speed or resource usage enhancement Suggestions for new features or improvements labels Nov 26, 2025
@imstevenpmwork imstevenpmwork marked this pull request as ready for review November 26, 2025 15:11
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@imstevenpmwork imstevenpmwork changed the title feat(utils): precise_sleep() less CPU hungry without sacrificing accu… feat(utils): precise_sleep() less CPU hungry without sacrificing accuracy Nov 26, 2025
@imstevenpmwork imstevenpmwork changed the title feat(utils): precise_sleep() less CPU hungry without sacrificing accuracy feat(utils): precise_sleep() less CPU hungry without sacrificing accuracy Nov 26, 2025
@imstevenpmwork imstevenpmwork merged commit b07160e into main Nov 26, 2025
12 checks passed
@imstevenpmwork imstevenpmwork deleted the feat/better_busy_wait branch November 26, 2025 16:42
XHAKA3456 pushed a commit to XHAKA3456/lerobot that referenced this pull request Dec 12, 2025
sandhya-cb pushed a commit to sandhya-cb/lerobot-clutterbot that referenced this pull request Jan 28, 2026
lu391see pushed a commit to lu391see/lerobot_tactile that referenced this pull request Mar 24, 2026
zouxiaochuan pushed a commit to magic-visual-plus/lerobot that referenced this pull request May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Suggestions for new features or improvements performance Issues aimed at improving speed or resource usage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants