Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(core/shell): speedup Command.execute & fix extra new lines #1299

Merged
merged 3 commits into from
May 9, 2024

Conversation

amrbashir
Copy link
Member

The speed gains comes from running the Command in Rust fully and returning the result in one go instead of using events.

The extra new lines was a regression from tauri-apps/tauri#6519
ref: tauri-apps/tauri#7684 (comment)

The speed gains comes from running the Command in Rust fully and returning the result in one go instead of using events.

The extra new lines was a regression from tauri-apps/tauri#6519
ref: tauri-apps/tauri#7684 (comment)
@amrbashir amrbashir requested a review from a team as a code owner May 8, 2024 16:59
@amrbashir amrbashir merged commit eb1679b into v2 May 9, 2024
17 checks passed
@amrbashir amrbashir deleted the enhance/shell-command-execute-speed branch May 9, 2024 15:15
@1zilc
Copy link

1zilc commented May 21, 2024

This PR caused my page to freeze abnormally, all .execute() look like they are executing synchronously 😕

@amrbashir
Copy link
Member Author

It is not synchronous but once the program finishes execution it will return its whole output at once, this should drastically increase speed for small to medium outputs, however large output data may notice freezes as the output comes in, in which I'd recommend using spawn and process each line as it comes but that will have its penalty as well.

@1zilc
Copy link

1zilc commented May 21, 2024

Thanks for the reply, I'll provide a minimal reproduction later

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants