Comments (19)
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.
Should be fixed in 0.3.0-build146.
from compose-multiplatform.
Its fixed, really cool!
from compose-multiplatform.
Sweet, I changed to the testing version and it doesn't lag anymore! Good job!
from compose-multiplatform.
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.
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.
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
from compose-multiplatform.
Found the reason. It only lags when a secondary monitor is connected. All other apps are fine.
from compose-multiplatform.
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.
I'm not sure what was the issue, but now it is suddenly fine. It does not lag on my machine.
from compose-multiplatform.
Could be Open GL drivers issue.
from compose-multiplatform.
Interesting, so not sure if we could do much on Compose side.
from compose-multiplatform.
I experience lag only when I focus on an OutlinedTextField
. Even mouse starts to stutter. (Arch Linux & i3)
from compose-multiplatform.
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.
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.
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.
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.
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.
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)
- Confusion in reading PNG image from composeResources/files/assets/ in v1.6.0 HOT 1
- "Unresolved reference: let" since Compose Multiplatform 1.6.1 on Android Studio HOT 2
- Gradle task build (allTests) fails on default web project generated by kmp.jetbrains.com HOT 3
- Cannot change dependencies of dependency configuration 'X' after it has been included in dependency resolution HOT 2
- DateRangePicker ignore first click HOT 1
- [iOS] Using Compose inside a ShareExtensionViewController renders it black HOT 4
- Cursor position is displayed on the left edge when textAlign is set to center in BasicTextField on iOS HOT 1
- Pressing the return key in TextField triggers the parent container's clickable HOT 3
- Support `commonResources` to `R`/`Icon` HOT 1
- Tray menus not working on Fedora HOT 2
- Cannot implement OnDestinationChangedListener in multiplatform navigation HOT 2
- [webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema. HOT 2
- ios WindowInsets.ime.getBottom return random LAST value when keyboard hide event
- `meta name="viewport"` not working properly on mobile browsers HOT 3
- Hotkeys when typing Korean in a TextField in macOs on Desktop Issue
- :packageDeb or :packageReleaseDeb fails at jpackage task HOT 1
- Add SVG support for arbitrary data sources HOT 1
- When I run it on MacOS, I use the Chinese input method to stay on the candidate word interface, and then click another TextField with the mouse, the APP crashes directly. HOT 2
- Memory usage increases exponentially with each opening of `ModalBottomSheet` on `iOS` HOT 3
- org.jetbrains.skiko.SystemThemeHelper.getCurrentSystemTheme() crash HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-multiplatform.