Skip to content

Only send bash updates every 200ms#4201

Closed
shantur wants to merge 1 commit into
anomalyco:devfrom
shantur:batch-bash-updates
Closed

Only send bash updates every 200ms#4201
shantur wants to merge 1 commit into
anomalyco:devfrom
shantur:batch-bash-updates

Conversation

@shantur

@shantur shantur commented Nov 11, 2025

Copy link
Copy Markdown
Contributor

Right now bash tool updates are sent to UI for every update on output stream.
Each update is a complete output till not ( not delta ) so for high volume output commands like adb logcat or dmesg, each update (new line / character ) leads to a 2MB of json for UI to parse.
With this change we buffer for 200ms before sending one big chunk for UI to process rather than lots of big chunks for each character / line update.

@shantur shantur mentioned this pull request Nov 11, 2025
@github-actions
github-actions Bot force-pushed the dev branch 3 times, most recently from f1dc981 to 3e15a39 Compare November 22, 2025 18:07
@github-actions
github-actions Bot force-pushed the dev branch 3 times, most recently from f8ee907 to 6a9856d Compare November 27, 2025 01:29
@shantur
shantur force-pushed the batch-bash-updates branch from ddd4b65 to 8eb678f Compare December 2, 2025 22:57
@shantur

shantur commented Dec 3, 2025

Copy link
Copy Markdown
Contributor Author

@rekram1-node : The build failure isn't due to my changes.

@rekram1-node

rekram1-node commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

@shantur in tui/context/sdk.tsx we have a flush/buffer implemtentation, maybe we can make it a util and then use it here too?

Also can we make the buffer 100ms?, 200ms is definitely noticeable and i'd try to be a bit more conservative w/ delay

@rekram1-node

rekram1-node commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

also you can do ./script/format.ts to fix the action

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.

2 participants