Open xurei opened 3 years ago
I just made a performance profiling of the page and here is the result :
Apparently there is some kind of throttle happening. The browser is almost always idle...
By comparison, the same profile results when opened in Chrome :
Our browser source is officially untested with CEF 88.0.4324 on Linux, so I'm not surprised there might be quirks.
Are browser docks/panels having similar performance issues, or is it limited to browser sources?
For what I know, it only happens on this specific, highly unoptimized page.
The other browser sources I are completely fluid. I just tested a more complex page with 200+ sprites moving and no lag at all.
Our browser source is officially untested with CEF 88.0.4324 on Linux
I'm not blaming or requesting anything here, I'm just curious about what could be causing this.
On AUR, there is two "stable" OBS packages, obs-studio-browser
which use this CEF and obs-studio-tytan652
which add some tweaks and use the right CEF.
Our browser source is officially untested with CEF 88.0.4324 on Linux
Can reproduce on Fedora though with CEF 4280 (from the OBS CDN).
I suspect missing hardware acceleration (to my knowledge that is still not available on Linux because ... reasons). My CPU fan ramps up immediately and it also gets less and less laggy the further down you set the resolution in the source properties.
CEF Hardware accel is actually made of unmerged PR for Windows and macOS unfortunately
I just checked and GPU raster is disabled on OBS side, and enabled in Chrome.
The root cause seems to be that indeed.
I'm trying obs-studio-tytan652
to see if there is any difference
Hardware rendering is not supported on linux because its not compatible with wayland. And in this case since you are on not on ubuntu, your packager's settings may vary*
@kkartaltepe Isn't there any way to detect a X11 environment then, which remains widely used, and I guess it would probably work ?
Probably, the minor testing we did during the last version mostly worked but wayland was our priority.
If you want to play with it locally you can apply the patch, if you see that doesnt help let us know and we can reopen the bug.
diff --git a/browser-app.cpp b/browser-app.cpp
index 3b867e7..22ba818 100644
--- a/browser-app.cpp
+++ b/browser-app.cpp
@@ -81,7 +81,7 @@ void BrowserApp::OnBeforeCommandLineProcessing(
CefString type = command_line->GetSwitchValue("type");
if (!enableGPU && type.empty()) {
- command_line->AppendSwitch("disable-gpu");
+ // command_line->AppendSwitch("disable-gpu");
command_line->AppendSwitch("disable-gpu-compositing");
}
}
That line doesn't exist on current obs-browser master:
However I still can reproduce the issue as stated above, and I am using the current master because I was testing the Drag&Drop fix
edit: https://github.com/obsproject/obs-browser/commit/d5640004b3e4ae2cd9c0e4a93b4da6b4d15c0498 obsproject/obs-browser#278
Ah looks like it did land before 27, sorry for misremembering.
@kkartaltepe The line is indeed missing. However, this portion of code gave me the hint :
bool enableGPU = command_line->HasSwitch("enable-gpu");
CefString type = command_line->GetSwitchValue("type");
if (!enableGPU && type.empty()) {
command_line->AppendSwitch("disable-gpu-compositing");
}
Running obs --enable-gpu
gives a much smoother rendering :smiley: around 25FPS
Chrome devtools still states that GPU raster is off, though. Around 25% of the frames are dropped when 60FPS are configured in OBS source properties. Almost none with 30FPS.
The sample page looks like it renders with CSS animations which I dont think will be as performant in cef for a long time. But maybe someone more knowledgeable can see if there is a better way to tickle cefs buttons.
I've tested 27.2.0 on Ubuntu 20.04, and it seems the issue still persists, even after the CEF update. I think the root cause is that the CEF shared texture support is not working. Are the shared textures implemented yet for Linux, or are they still WIP?
I've tested 27.2.0 on Ubuntu 20.04, and it seems the issue still persists, even after the CEF update. I think the root cause is that the CEF shared texture support is not working. Are the shared textures implemented yet for Linux, or are they still WIP?
Shared textures are only on Windows and macOS right now.
Operating System Info
Other
Other OS
Manjaro Linux
OBS Studio Version
27.0.1
OBS Studio Version (Other)
No response
OBS Studio Log URL
https://obsproject.com/logs/FsbiJvZzu3Kl4SSU
OBS Studio Crash Log URL
No response
Expected Behavior
Using this as a Browser Source : https://outer-wilds-anim-6zl8zgucn-xurei.vercel.app/
A comparable FPS using the Browser Source compared to Chrome/FF
Current Behavior
The framerate is really laggy (~5FPS).
Steps to Reproduce
Anything else we should know?
Note that the page is not optimized at all. I'm actually more interested for an explanation of the underlying cause rather than an actual fix of the issue.
I tested it on Windows and the animation is fluid.