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
BUG: CPU High after Curve Use #876
Comments
@SebNik1 , Welcome to the project. Thanks for reporting these issues. Would you create another issue for the color theme problem? Its easier to track problems individually. Thanks! |
I am very sorry, I used to get notifications on respones here but seems I no longer get them and so I am replying with much delay. First thank you for the respones. I will recheck the colour issue and open a new topic. Regarding the CPU load I upgraded frequently and the problem sustained. Now I'm on 2023.6.5.206. Already some days ago I realized that it might be related to the zoom level. As soon as I cross the 100% zoom level the cpu load rises to a high level. Can you confirm that? |
I'm also having this problem. For me, it seems not to have anything to do with the zoom level, but whether a spline is displayed. If there is a spline in my pattern but offscreen, CPU usage is normal. If I scroll over or zoom out so that the spline is back in view, CPU usage shoots up to max and stays there until the spline is removed or scrolled/zoomed out of view.
|
Thanks for the feedback. This may help pinpoint why the cpu usage is high with the curves. I'm curious though what's different on the macOS builds that causes this compared to to Windows. Seems like there may be something in the curve graphic items that are calling (curve) items to be constantly repainted.... when in view. |
I also see this happening on Ventura 13.5 + Seamly 2023.12.18.149 after noticing battery drain. seamly2d_busy_with_splines.txt is the output of asking Activity Monitor to analyze the process. I peeked into it only briefly, as I am not familiar at all with Qt and Mac development, but at a glance it seems to confirm a bunch of Qt event processing and drawing keeping the CPU busy, judging by the method names in the stack frames for utilization. When I make a pattern piece including the curves in question, CPU usage appears to be fine while the curves are displayed in the Piece view. Usage briefly shoots up every time I am panning around in that view, without changing zoom level, which is a bit surprising, as I would have expected it to only paint once in that case, but then again I am unfamiliar with Qt. |
Interesting: with the curves showing, CPU usage drops back to normal when "Toggle Control Points and Curve Direction" is turned off. |
Yes. This is a known behavior. When the points are toggled on, it's causing a constant repainting of the curves. For some reason it's more apparent on Macs. When I get a chance I need to get back to figuring out exactly what event signals are triggering the repaints. |
Another thing I noticed, where I am not sure if it makes the power consumption worse in this case, is that Seamly2D shows up as "Intel" rather than "Apple" in Activity Monitor on my M1 MacBook Air, so I assume these are not universal builds yet? |
Yes, Qt 5.15.2 which we are using is still Intel only, but that does not add much to the CPU usage as the translation between Intel and Apple silicon is very efficient. The tight looping and constant repainting is the real issue, as described by @DSCaskey |
Thank you all very very much for your effort in this! :) And [hermannloose], I didn't know about this workaround, thats really good to know. I'll turn the control points off when not needed. Maybe there will be a fix. |
First of all thank you very much for seamly2d, I very happly use it for over two years now. I have experienced the same problem with the curves before but as it persists I would like to kindly bring it to your attention. As soon as I use any of the curve tools Seamly2D starts using very high cpu usage. This persists even after deleting the curves again with no curves remaining in the construction. My Macbook Pro is a late 2013 with i7 2.3Ghz and 16GB of RAM. In regular cases seamly2d doesnt use more than 5% CPU at the max.
Maybe you can try reproducing this. I'd be very happy to hear from you.
P.S. in Addition I got trouble with the color scheme, if this is a user setting I'm sorry to trouble you:
The text was updated successfully, but these errors were encountered: