element-hq / element-call

Group calls powered by Matrix
https://call.element.io
GNU Affero General Public License v3.0
589 stars 90 forks source link

On some devices, the CPU usage is a bit high. #593

Open YamatoRyou opened 2 years ago

YamatoRyou commented 2 years ago

Steps to reproduce

  1. Join the first 60 seconds of the video call. {26765F84-2310-1EE1-88B2-040F9BDC9C3E}_1

  2. Within seconds after joining the video call. {26765F84-2310-1EE1-88B2-040F9BDC9C3E}_2

  3. After 60 seconds of joining the video call. {26765F84-2310-1EE1-88B2-040F9BDC9C3E}_3

  4. Within seconds after ending the video call. {26765F84-2310-1EE1-88B2-040F9BDC9C3E}_4

During the above test, the camera was always disabled.

Outcome

What did you expect?

n/a

What happened instead?

Device A (Laptop): CPU: Intel Core-i7 8750h Physical memory: 8 GB OS: 64-bit Windows 10 21H2 LTSC Internet connection: Wi-Fi, on LAN Browser: Catsxp Browser 2.9.3 (based on Chromium 105.0.5195.118 for Windows x64) Access Element-web via an IPv6 address.

If the above devices join the video chat without starting the camera, the CPU usage will fluctuate around 20%. If the camera is activated additionally, the usage will continue to rise to about 30%. Hang up the video call and it will return to normal. In order to compare with another device, none of the above processes start the camera.


Device B (Desktop): CPU: Intel Xeon E3-1230 v2 Physical memory: 16 GB Operating System: 64-bit Windows 7 SP1 Network connection: connected to the router by cable, located on the LAN Browser: Catsxp Browser 2.9.3 (based on Chromium 105.0.5195.118 for Windows x64) Access Element-web via an IPv6 address.

This device does not have a camera and the same test method failed to reproduce the problem.

Operating system

x64 Windows 10 21H2 LTSC

Browser information

Catsxp Browser 2.9.3 (based on Chromium 105.0.5195.118 for Windows x64)

URL for webapp

0.2.13 (Element-web version: d1754559ad2b-react-fa2ec7f6c98e-js-2e10b6065cca)

Will you send logs?

No

dbkr commented 2 years ago

Is it just those two devices in the call?

YamatoRyou commented 2 years ago

Is it just those two devices in the call?

Only at most 1 device can use this function during the test, when the 2nd device starts the test, the previous one ends the video call. I only have these devices.

HarHarLinks commented 2 years ago

My CPU usage is also exorbitant. It appears to use software encoding, not sure how to check exactly. My i5-3320M may not have support for the format used. Chrome tells me something about missing webrtc hardware codec support.

dbkr commented 2 years ago

It's very possible there's something that needs to be optimised here - a CPU profile from the browser's dev tool could be very useful if anyone experiencing this is able to provide one.