mirror of
https://github.com/asciinema/asciinema.git
synced 2026-04-25 16:05:52 +03:00
[PR #724] [MERGED] allow play to stream events #1215
Labels
No labels
bug
compatibility
feature request
fit for beginners
help wanted
hosting
idea
improvement
packaging
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/asciinema#1215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/asciinema/asciinema/pull/724
Author: @fopina
Created: 2/9/2026
Status: ✅ Merged
Merged: 2/10/2026
Merged by: @ku1ik
Base:
develop← Head:feature/stream-play-events📝 Commits (2)
4544047allowplayto stream eventsdcfbe1eApply rustfmt formatting to v2.rs📊 Changes
4 files changed (+13 additions, -12 deletions)
View changed files
📝
src/asciicast.rs(+6 -6)📝
src/asciicast/v2.rs(+4 -1)📝
src/asciicast/v3.rs(+1 -1)📝
src/player.rs(+2 -4)📄 Description
This change removes the memory bottleneck in the play command by streaming events from disk instead of loading them all into memory.
This is greatly assisted by Claude but after a long chat around the existing
.collectand its motivation.Changes:
Benefits:
Technical details:
The original code used .collect() because tokio::spawn requires 'static lifetime. By using spawn_blocking instead, we can stream the iterator directly since blocking tasks don't have the same lifetime constraints. File I/O is blocking anyway, so this is the correct approach.
Testing:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.