tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[bug] rust-analyzer, pnpm tauri dev takes too long when save a rs file

Open liuxsen opened this issue 7 months ago • 5 comments

Describe the bug

  • too slowly wehen.save a rs file;

  • The error messages appear very slowly, and the build process is slow as well, which significantly affects the development experience and speed.

  • Error messages only appear after the build is complete, but the build takes a long time—around 40 seconds.

Reproduction

No response

Expected behavior

No response

Full tauri info output

> tauri "info"


[✔] Environment
    - OS: Mac OS 15.5.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.87.0 (17067e9ac 2025-05-09)
    ✔ cargo: 1.87.0 (99624be96 2025-05-06)
    ✔ rustup: 1.28.2 (e4f3ad6f8 2025-04-28)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.20.5
    - pnpm: 9.15.0
    - yarn: 1.22.22
    - npm: 10.8.2

[-] Packages
    - tauri 🦀: 2.5.1
    - tauri-build 🦀: 2.2.0
    - wry 🦀: 0.51.2
    - tao 🦀: 0.33.0
    - @tauri-apps/api : 2.5.0
    - @tauri-apps/cli : 2.5.0

[-] Plugins
    - tauri-plugin-opener 🦀: 2.2.7
    - @tauri-apps/plugin-opener : 2.2.7

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

Stack trace


Additional context

No response

liuxsen avatar May 21 '25 09:05 liuxsen

can you check if this speeds it up? https://github.com/tauri-apps/tauri/issues/11577#issuecomment-2461341697

FabianLars avatar May 21 '25 09:05 FabianLars

can you check if this speeds it up? #11577 (comment)

Image

Image

report an error;

liuxsen avatar May 21 '25 09:05 liuxsen

The macOS key is case-sensitive so you need bundle.macOS not bundle.macos

FabianLars avatar May 21 '25 10:05 FabianLars

If it does improve performance, I think it's more placebo, on my M1 machine at least. It's mostly the "objc2-..." dependencies that take a while. Not sure why they always need to be built.

llama-for3ver avatar May 22 '25 01:05 llama-for3ver

The macOS key is case-sensitive so you need bundle.macOS not bundle.macos``macOS 密钥区分大小写,因此您需要 bundle.macOS 而不是 bundle.macos

@FabianLars

“Hi, could you add a section on the official website for common issues or FAQs?”

liuxsen avatar May 22 '25 14:05 liuxsen

The macOS key is case-sensitive so you need bundle.macOS not bundle.macosmacOS `` 密钥区分大小写,因此您需要 bundle.macOS 而不是 bundle.macos

@FabianLars

“Hi, could you add a section on the official website for common issues or FAQs?”

JSON itself is case-sensitive, I don't think there is any need to add explanations. But if we need it: https://github.com/tauri-apps/tauri-docs/pull/3380

AprilNEA avatar Jul 02 '25 04:07 AprilNEA

If it does improve performance, I think it's more placebo, on my M1 machine at least. It's mostly the "objc2-..." dependencies that take a while. Not sure why they always need to be built.

What i linked should prevent those deps from being recompiled == not a placebo. I had a local branch that doesn't set the env var in tauri dev, will see what's needed to finish that up.

JSON itself is case-sensitive, I don't think there is any need to add explanations. But if we need it: https://github.com/tauri-apps/tauri-docs/pull/3380

I agree but it doesn't hurt either, will check out the PR in a minute. thanks

FabianLars avatar Jul 02 '25 11:07 FabianLars