tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
79.46k stars 2.36k forks source link

Tauri windows build lag issue with WebGL. #8020

Open deepushajia opened 8 months ago

deepushajia commented 8 months ago

Describe the bug

I am using WebGL in my tauri app on top of reactJS. Things are working smoothly on dev window, but when I run the app from the build, I am noticing considerable drop in performance on the webgl rendering, mostly lag. What could be the issue considering the webview2 used to render is same in both dev and build right?

Reproduction

No response

Expected behavior

Almost similar performance on dev and build.

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 117.0.2045.60
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ Cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 18.18.1
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: 1.5.1
    - tauri-build [RUST]: 1.5.0
    - wry [RUST]: 0.24.4
    - tao [RUST]: 0.16.4
    - tauri-cli [RUST]: not installed!
    - @tauri-apps/api [NPM]: 1.5.0
    - @tauri-apps/cli [NPM]: 1.5.1 (outdated, latest: 1.5.2)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../build
    - devPath: http://localhost:3000/
    - framework: React

Stack trace

No response

Additional context

No response

FabianLars commented 8 months ago

Yeah, the rendering is the same. The only difference i can think of is that files are loaded differently. In dev it's your dev server and in build mode it's tauri itself serving those. I don't think that matters but it's the only thing that comes to mind. Could you maybe create a minimal reproduction example so we can check it out too?

Jon2066 commented 1 week ago

same problem, any progress?