-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issue? #78
Comments
I already know this issue.. I think maybe it is because that time, the events are too many... I do not very know how to fix it.. |
Ok. seems I have fixed some problems... |
One problem is here when you forword the iced event, it will try to send messages through channel, but the receiver here only accept new message once a time, this sucks all the actions, I think maybe you can try to move the logic to a new thread? I do not come out with better way to fix it |
https://github.com/waycrate/exwlshelleventloop/pulls will this fix the issue? at least it fix some of mime case |
I will try. Recently, the pop_os team synced their iced fork with the upstream one, so I was able to test my program with Iced 13 with their version. Some performance degradation is also present there. In particular, moving the mouse over a button and some other things. The scroll problem and the slider problem are not present. |
I find out what happened with scroll, lol, I will fix it Now in v0.9.4-rc2 the problem about the event too slow is solved, now it is fast enough and the scroll problem is solved too, now it is smooth enough! |
That's way way way better! It remains a high CPU usage with the mouse over a button but could be related to the iced 13 version because it's present also in the pop_os fork (maybe it's just a little bit less) I think that this issue could be closed with these changes |
Seems the last one is not my problem... my plugin does nothing when hover on the button.. seems it will be better to submit an issue to iced... I have seen your pr, I think you should upgrade to the newest version, it improves the performance again. |
I think the same, the issue it's more iced related |
I recently completed porting my application from the layer shell library used by the pop_os team to this project.
In the process, I noticed an increase in CPU usage, both in an idle state and especially in some circumstances. I know that I'm a bit too general and also I moved from Iced12 to Iced13 in the process so it could be a regression (even if it's a major one so it seems strange to me).
Anyway, I will try to find more details, in the meantime three major things that I noticed are:
Scrollable
The
scrollable
widget has major issues during scrolling (both with the mouse and trackpad). It's almost impossible to scroll and the scroll freezes on the top and after a while reach instantly the bottom, so it's not a smooth experience.In this case, I notice a huge increase in CPU usage.
The "old" version goes from 0.0%/0.2% to 1.0% during the scroll. Now goes from 0.2%/0.4% to 3.8%.
Slider
In this case, the situation is similar. I notice more or less the same CPU usage increment. The experience is smooth but the value changes during the user interaction with values that are not what are currently selected. (it's difficult to explain).
The problem here could be caused by me. On the audio slider
on_change
I call my PulseAudio using an iced Task, after setting the audio the pulseaudio subscription sends a Message with the new audio value.If the interaction is too slow could happen:
on_change(30)
message,on_change(50)
In this case, I could handle better the interaction but before this issue didn't appear. Could be related to the iced update from 12 to 13, the performance issue, or both. The spike in CPU usage remains strange.
Moving the mouse
Moving the mouse over a button caused an increase in CPU usage from 0.2% to 2.2% before it was 0.1% to 0.6%. If I open a submenu (so another wayland layer shell) it's even more evident because I trigger the submenu closing when I click in a specific zone of the layer and the close event lags quite a bit. Sometimes, I have to click multiple times to close the submenu.
Conclusion
I know that's a lot of stuff. I have no hurry and I don't expect to see everything resolved. I'm here only to give you feedback on a "real-world example" in case you want something to work on.
I will try my best to find the root cause of these problems but for me, it's difficult because first I have to study the codebase 😅
The text was updated successfully, but these errors were encountered: