Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

The performance in WebXR has dropped by half #111

Closed yeungeek closed 3 months ago

yeungeek commented 3 months ago

After using the latest code, WebXR performance drops from 90HZ to 45HZ after loading this page(https://immersive-web.github.io/webxr-samples/teleportation.html). However, it's normal under the Gecko engine. What information is needed for troubleshooting? @svillar

@zakharvoit Not the same as #103.

Use the perfetto to track, com.igalia.wolvic:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0cost much time.

image

CrRendererMain Thread: image

svillar commented 3 months ago

have you seen the same in any other experience?

yeungeek commented 3 months ago

The above case was tested based on Rokid devices (Qualcomm Snapdragon XR2+ Gen 1). Later, we also conducted tests on Pico4, and the frame rate also dropped from 90Hz to 50Hz.

Is there any way to pinpoint the specific issue or provide relevant logs?

Thanks!

svillar commented 3 months ago

what I am trying to understand is when that performance drop happened. Which version does provide 90FPS and which one 45FPS? Are you comparing different chromium versions? Or comparing the chromium version with the gecko one?

yeungeek commented 3 months ago

We compared the Chromium and Gecko versions. Upon entering the WebXR site, we noticed a difference in GPU usage time. Chromium perfetto trace, Cost 10ms:

chrome

Gecko perfetto trace, Cost 6ms:

gecko

The GPU usage time exactly corresponds with the frame rate. Does this help in analyzing the problem?

svillar commented 3 months ago

Wow that's surprising because we've seen exactly the opposite, chromium providing 2x and even 3x the FPS compared to gecko. We'll check that

yeungeek commented 3 months ago

We were surprised and thought it might be a code issue, but we only compiled different browser kernel versions. Could there be different configurations, or is there a discrepancy in the Chromium version we compiled?

The compilation of Chromium followed:https://github.com/Igalia/wolvic/blob/main/CHROMIUM.md

What VR device was your testing based on?

We will test on other VR devices as well.

yeungeek commented 3 months ago

Wow that's surprising because we've seen exactly the opposite, chromium providing 2x and even 3x the FPS compared to gecko. We'll check that

To add, the frame rate is normal when first entering the application, but it only drops after entering the WebXR site.

svillar commented 3 months ago

We were surprised and thought it might be a code issue, but we only compiled different browser kernel versions. Could there be different configurations, or is there a discrepancy in the Chromium version we compiled?

The compilation of Chromium followed:https://github.com/Igalia/wolvic/blob/main/CHROMIUM.md

What VR device was your testing based on?

We will test on other VR devices as well.

Are you sure you have built a release version of chromium? If you build chromium debug the performance is much worst due to the extra amount of code it executes and the lack of compiler optimizations.

Also can you reproduce it with the packages we released?

I've just tried the experience on a pico4 and I'm getting a constant 72PFS which is the maximum given the 72Hz refresh rate of the device

yeungeek commented 3 months ago

I’m trying to determine if it’s a debug version issue. That might be the cause. We will recompile and test the release version again. Thanks!

yeungeek commented 3 months ago

After switching to the release version, the frame rate improved to an average of 80FPS. The difference between debug and release versions is very noticeable. Thanks to @svillar for the support. But Gecko can reach 90fps,We will further investigate their differences. We also look forward to the stable release of Wolvic Chromium soon.

svillar commented 3 months ago

OK closing now