obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
783 stars 225 forks source link

StreamLabs Bit Cup / Tip Jar Performance with Browser Source #78

Closed macharborguy closed 5 years ago

macharborguy commented 7 years ago

Browser Source : 1.29 OBS Studio : 18.0.1 64bit

Processor : Core i7 860 (old, yes, but this is in a dedicated Broadcasting system. games are on a different PC and I capture via HDMI)

I noticed that while broadcasting, OBS said it was using around 60% - 70% CPU, but that my CPU itself was getting pegged at around 95% - 100%

Investigating, I narrowed it down to a cef-bootstrap.exe process that was handling our StreamLabs Bit Cup / Tip Jar.

Every other browser source that I use (hell, I wrote all of them but the Bit Cup) use around 1% MAX each when in idle. The bit cup, however, is using around 20% when in idle. When I run the same Bit Cup source directly in a browser (not identical to CEF, but it is a way to test it at least), it uses 1% - 2% when idle.

Has anyone else noticed any performance issues like this with the Muxy and StreamLabs bit cups, or is this more of a problem with the cups themselves not having good optimizations?

DDRBoxman commented 7 years ago

The root of the issue is an issue with GPU rendering in CEF with offscreen rendering. Until that gets fixed OBS browser source doesn't use the GPU. Other sources aren't that intense but both visualisations currently use pixi.js which will use more rendering resources.

https://bitbucket.org/chromiumembedded/cef/pull-requests/96/osr-fix-gpu-cpu-readback-performance/diff

Azzurite commented 7 years ago

I'm having this problem as well. Not necessarily StreamLabs Tip Jar but general browser source.

Would it be possible to merge the changes from that PR and add that to OBS?

scaredpanda commented 6 years ago

I am having the same issue, I narrowed it down specifically to the bootstrap for the scrolling text/bit drop over the jar. The stationary jar that doesn't move has it's own bootstrap and it doesn't jump in cpu.

OsirisNL commented 6 years ago

The physics part of all the little bits is quite cpu-intensive.

Azzurite commented 6 years ago

It may be, but it doesn't use as much CPU in "normal" browsers, which is the weird part.

CoDEmanX commented 6 years ago

@macharborguy Can you try again with OBS 22? It comes with significant performance improvements for the browser source.

OsirisNL commented 6 years ago

This has definitely improved, on my machine it uses 1-2% CPU and 3% GPU