Giter VIP home page Giter VIP logo

Comments (19)

igordmn avatar igordmn commented on May 14, 2024 12

Problem with two displays should be fixed soon.

There is prebuilt version for testing: 0.0.0-vsync-build30

P.S. I discovered a new performance issue with maximized window, not related to this issue.

from compose-multiplatform.

igordmn avatar igordmn commented on May 14, 2024 9

Should be fixed in 0.3.0-build146.

from compose-multiplatform.

Janrupf avatar Janrupf commented on May 14, 2024 6

Its fixed, really cool!

from compose-multiplatform.

Spationaute avatar Spationaute commented on May 14, 2024 6

Sweet, I changed to the testing version and it doesn't lag anymore! Good job!

from compose-multiplatform.

igordmn avatar igordmn commented on May 14, 2024 4

With two connected monitors, this code:

wrapped.graphicsConfiguration.device.displayMode.refreshRate

can be very slow (50-100ms).
We call it on every frame.

We will try to switch to system vsync instead of this in #137

from compose-multiplatform.

igordmn avatar igordmn commented on May 14, 2024 3

When will this be merged into a full release?

I hope this week or at the beginning of the next. The changes are on a review now:
https://android-review.googlesource.com/c/platform/frameworks/support/+/1535152
https://android-review.googlesource.com/c/platform/frameworks/support/+/1534675

from compose-multiplatform.

sergeyampo avatar sergeyampo commented on May 14, 2024 3

Spent so many hours finding how to improve UI performance on Ubuntu 21 with Nvidia graphic card. Tried literally everything but what does help is:
sudo nvidia-settings
image

from compose-multiplatform.

arkivanov avatar arkivanov commented on May 14, 2024 2

Found the reason. It only lags when a secondary monitor is connected. All other apps are fine.

from compose-multiplatform.

ToxicBakery avatar ToxicBakery commented on May 14, 2024 1

I'm on Ubunutu as well and compose probably runs at around 15-20 fps. Using nvidia drivers with a 1080ti and a single ultrawide monitor. I ran the CEF demo and interestingly CEF has pretty good frame rates, I can even watch Youtube inside the CEF without issue, but compose continues to have poor frame rate.

Any debugging you would like done that might help highlight what the issue is? Adding some system information to minimize any back and forths on this.

$ uname -a
Linux ubuntu-desktop 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
$ nvidia-smi 
Tue Nov 10 08:41:46 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 435.21       Driver Version: 435.21       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 108...  Off  | 00000000:42:00.0  On |                  N/A |
| 16%   55C    P0    66W / 250W |    894MiB / 11175MiB |      6%      Default |
+-------------------------------+----------------------+----------------------+

from compose-multiplatform.

arkivanov avatar arkivanov commented on May 14, 2024

I'm not sure what was the issue, but now it is suddenly fine. It does not lag on my machine.

from compose-multiplatform.

olonho avatar olonho commented on May 14, 2024

Could be Open GL drivers issue.

from compose-multiplatform.

olonho avatar olonho commented on May 14, 2024

Interesting, so not sure if we could do much on Compose side.

from compose-multiplatform.

Dominaezzz avatar Dominaezzz commented on May 14, 2024

I experience lag only when I focus on an OutlinedTextField. Even mouse starts to stutter. (Arch Linux & i3)

from compose-multiplatform.

Dominaezzz avatar Dominaezzz commented on May 14, 2024

I don't think this has to do with rendering (OpenGL) issues.
I think this has to do with (some kind of) event handling.
I only get lag when there's some sort of animation involved.

from compose-multiplatform.

kevincianfarini avatar kevincianfarini commented on May 14, 2024

Which display server is being used? X11, XWayland, or native wayland?

Does the issue persist if you switch sessions to another display server?

from compose-multiplatform.

petitJAM avatar petitJAM commented on May 14, 2024

I'm getting similar issues running on Ubuntu 20.04 on X11 with multiple monitors. Performance does get worse when a TextField is displayed. I hadn't realized that multiple monitors was the problem until I found this issue, but then I tried it without them attached and it does seem to work smoothly.

I haven't tried on Wayland, but I do have that installed, so I could give it a go soon.

$ uname -a
Linux bryyo 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
$ nvidia-smi 
Tue Dec 29 08:52:29 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 450.80.02    Driver Version: 450.80.02    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro M2200        Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   47C    P0    N/A /  N/A |    743MiB /  4043MiB |     26%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

I've seen the same thing in both of these projects, so I don't think it's related to any specific code that I've written, but just in case it helps:
https://github.com/petitJAM/compose-test-app
https://github.com/petitJAM/Avidity

from compose-multiplatform.

Janrupf avatar Janrupf commented on May 14, 2024

Same issue here, I to be honest have not tested disconnecting monitors, but I will assume that my 3 connected monitors are the issue. Running the demo app and then clicking the button lags the entire desktop for about 2 seconds.

Its just this example code:

fun main() = Window {
    var text by remember { mutableStateOf("Hello, World!") }

    MaterialTheme {
        Button(onClick = {
            text = "Hello, Desktop!"
        }) {
            Text(text)
        }
    }
}

This should be enough to fully reproduce the issue. I want to point out once again that it is enough to click the button in the example and everything lags.

System info:

OS: Arch Linux x86_64
Kernel: 5.10.3-arch1-1
Resolution: 1920x1080, 1920x1080, 1920x1080
WM: i3-gaps
CPU: AMD Ryzen Threadripper 1950X (32) @ 3.400GHz
GPU: NVIDIA GeForce GTX 1080
Memory: 14737MiB / 64223MiB

NVIDIA smi:

Fri Jan  8 19:30:11 2021       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 455.45.01    Driver Version: 455.45.01    CUDA Version: 11.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080    Off  | 00000000:09:00.0  On |                  N/A |
|  0%   58C    P5    24W / 240W |    994MiB /  8111MiB |     18%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1345      G   /usr/lib/Xorg                     657MiB |
|    0   N/A  N/A      1453      G   ...AAAAAAAA== --shared-files       67MiB |
|    0   N/A  N/A      2479      G   ...AAAAAAAAA= --shared-files       33MiB |
|    0   N/A  N/A     13521      G   kitty                               3MiB |
|    0   N/A  N/A     15561      G   ./ts3client_linux_amd64             2MiB |
|    0   N/A  N/A     35932      G   picom                               2MiB |
|    0   N/A  N/A     35934      G   .../xscreensaver/glslideshow       50MiB |
|    0   N/A  N/A     35935      G   .../xscreensaver/glslideshow       50MiB |
|    0   N/A  N/A     35936      G   .../xscreensaver/glslideshow       50MiB |
|    0   N/A  N/A     48521      G   .../java-14-openjdk/bin/java        7MiB |
+-----------------------------------------------------------------------------+

Killing the compositor and other OpenGL applications doesn't change anything.

from compose-multiplatform.

Spationaute avatar Spationaute commented on May 14, 2024

I got the same problem:

 OS: Ubuntu 20.04 focal
 Kernel: x86_64 Linux 5.4.0-60-generic
 Resolution: 3840x1080
 DE: GNOME 3.36.4
 CPU: Intel Core i7-8750H @ 12x 4.1GHz [62.0°C]
 GPU: GeForce GTX 1060
 RAM: 11675MiB / 31804MiB
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce GTX 1060    Off  | 00000000:01:00.0  On |                  N/A |
| N/A   58C    P0    23W /  N/A |    349MiB /  6078MiB |      8%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1627      G   /usr/lib/xorg/Xorg                251MiB |
|    0   N/A  N/A      2095      G   /usr/bin/gnome-shell               88MiB |
|    0   N/A  N/A     45660      G   ...m/java-15-oracle/bin/java        5MiB |
+-----------------------------------------------------------------------------+

from compose-multiplatform.

tth05 avatar tth05 commented on May 14, 2024

When will this be merged into a full release? I'm having the same issue, 15 FPS or lower, disconnecting one monitor doesn't help. The custom prebuilt version fixes it though.

from compose-multiplatform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.