Hey! I couldn't find anything about this problem h...
# compose-desktop
t
Hey! I couldn't find anything about this problem here so maybe someone can help me When I resize window, my compose layout resizes with lags. But if I change the window size slowly it works +- ok but if I change it fast, it lags. It's not a complex layout - just a
fillMaxSize
black box. I thought it's on debug build only but on distributable production build it reproduces too
p
Are you recomposing/redrawing on window size change?
I have been playing with resizing windows and haven't noticed that lag. But unfortunately I have only tested MacOS.
Just place some text Composable inside the Box and put some logs to check if recomposition gets triggered when you resize the window. Most likely it won't happen. You need to observe the windowState.size change to trigger recomposition.
t
I thought it's something about skiko rendering APIs, maybe on macOS's Metal it works much better than Direct3D on Windows 11. I tried to change rendering API to OpenGL but nothing changed
In the project video you can see that I resize it slowly, I tried fast now and still good
t
Nice job! Really like your lib 🙂 I think it's platform dependent and only Windows bug
p
Nice job! Really like your lib 🙂
I think it’s platform dependent and only Windows bug
Thanks buddy, in fact I need contributors with some fresh ideas. I plan to use it as a backbone to make template apps to sell. Back to the issue. Yes correct, seems to be related to the way Windows repaint the window
t
Which Java version do you use?
I'm not sure about it but this issue seems kinda similar to that. It's Java Swing under the hood anyway https://bugs.openjdk.org/browse/JDK-8204155
p
Copy code
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment JBR-17.0.5+1-653.6-nomod (build 17.0.5+1-b653.6)
OpenJDK 64-Bit Server VM JBR-17.0.5+1-653.6-nomod (build 17.0.5+1-b653.6, mixed mode)
Although sometimes I run it from within Android Studio that has openjdk11 and is good too. I see that issue above looks way worse than yours but they seem to be related somehow. In your case is a lag in their case it gets completely stuck.
t
Yea, I have jdk17 too. It's kind of strange and user unfriendly, let's wait for contributors 😞
a
I remember this being a very long-standing issue with Java/Swing. Here’s a bug report from 2005: https://bugs.openjdk.org/browse/JDK-6329277
p
Interesting ahh
n
I tried it out on linux as well there's very minor lag
t
windows moment 💀
240 Views