Skip to content

Conversation

@Magnus1X
Copy link

@Magnus1X Magnus1X commented Dec 3, 2025

Description

This PR optimizes the tauri info command by batching npm package version checks. Previously, the CLI spawned a new process for each package to check its version, which could be slow.

What’s changed

  • Modified crates/tauri-cli/src/info/packages_nodejs.rs and crates/tauri-cli/src/info/plugins.rs to use current_package_versions.
  • The CLI now fetches all required package versions in a single command execution instead of sequentially.
  • Added a release log file for the performance improvement.

Why

This change significantly reduces the overhead of running tauri info, especially in projects with many plugins, by minimizing the number of shell commands executed. This results in a faster and more responsive CLI experience.

@Magnus1X Magnus1X requested a review from a team as a code owner December 3, 2025 19:41
@github-project-automation github-project-automation bot moved this to 📬Proposal in Roadmap Dec 3, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2025

Package Changes Through 85e7151

There are 2 changes which include tauri-macos-sign with patch, tauri-bundler with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tauri-macos-sign 2.3.1 2.3.2
tauri-bundler 2.7.4 2.7.5
@tauri-apps/cli 2.9.5 2.9.6
tauri-cli 2.9.5 2.9.6

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@Tunglies
Copy link
Contributor

Tunglies commented Dec 4, 2025

I am dobtful with this really improved performance, and memory side

  • Additional vec! allocated and iter it again
  • Additional collect::<Vec<_>> inplace
  • More clone
  • More String allocate
  • More collect behavior
  • HashMap?

Copy link
Contributor

@Legend-Master Legend-Master left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! Do you mind also adding a change file?

https://github.com/tauri-apps/tauri/blob/dev/.changes/README.md

I am dobtful with this really improved performance, and memory side

This is mainly for batching the package manager calls through migrating to current_package_versions, that plays a much bigger role in terms of performance so I think this is worth while the trade offs

version: Option<String>,
frontend_dir: PathBuf,
package_manager: PackageManager,
current_version: Option<semver::Version>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any differences between this and the version parameter above?

Comment on lines +140 to +143
let mut packages = vec![("@tauri-apps/api", None)];
if let Some(cli) = &metadata.js_cli.version {
packages.push(("@tauri-apps/cli", Some(cli.clone())));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change doesn't really do anything, please revert

@github-project-automation github-project-automation bot moved this from 📬Proposal to 🏗 In progress in Roadmap Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

3 participants