Closed gocursor closed 3 years ago
Thanks for opening this!
What OS are you running the app on? When the time per frame is set really low the application runs slower (as it needs to render more), but it still eventually stops. If you set the threads option to something low does it fix it?
I am running on Windows 10. I set the "Time per Frame" to 10 and "Threads" to 2 and the "Stop" button is still not working. But if I leave the default settings ("Time per Frame" set to 250) and set the "Points" to 1500 I also can not stop the rendering with the "Stop" button (I have to kill the app and start again).
I think the issue is that the algorithm is using 100% of your CPU, so the app is unresponsive to your input. I'm not sure what the best way to fix that would be, but I'll see what I can do.
Out of curiosity, what CPU model or how many cores do you have? I feel this issue may be more prevalent on slower systems. Also, is the rest of the GUI frozen when the stop button doesn't work?
Tested on CPU model i7-8650U, 4 cores, 8 threads. Maybe it is just my wrong understanding what "Time per Frame" does... When I set "Time per Frame" to 1000 or 2000 I can stop everything - even when "Points" are set to 1500... So what exactly is "Time per Frame"?
Time per frame is the length of time between each frame rendered in milliseconds. For example, if the time per frame is 1000, a frame will be rendered every second.
Great project! Having a similar issue, using a single thread with 3000 points, blocks the ui.
That's interesting. I tested it out on a Windows laptop, and I can confirm that it is an issue. I'm going to open an issue in Wails and see if there's a fix.
Turns out the issue was SVG rendering on ie11 is very slow - I'm going to switch to canvas instead.
Just published a new release - it seems to be working faster for me now. Does this fix your issue?
It fixed it for higher points (3,000+ depending on CPU I'm guessing); I can now stop rendering for 3,000 points where it couldn't before.
However, if I try 10,000 points, it will still lag out / be unresponsive to stopping.
i5-7300 32 GB ram Windows 10, using Triangula.exe Threads = 0 All default settings, except 10,000 points
Don't know if that's beyond use case but it might be helpful to mention.
10,000 points will produce around 20,000 triangles, which is a lot for an HTML canvas. If you set the time per frame to 2500 or even 10000 does it work better?
10,000 points is beyond Triangula's intended use case, so I'm going to close this for now. It's unfortunate that this issue only affects Windows, but that will hopefully change with Wails v2.
The CLI still works fine with any number of points, so consider using that instead. I'm sure many others have had this issue, so thanks for bringing it up!
10,000 points will produce around 20,000 triangles, which is a lot for an HTML canvas. If you set the time per frame to 2500 or even 10000 does it work better?
Yes -- setting Time per Frame to 2500 makes it run 10000 points much faster. GUI is slightly laggy but can stop no problem now. I understand now, I thought Time Per Frame was how long it would give the program time to simulate the triangle fitting and would affect accuracy, but now I understand that's just time to draw updates on the screen.
Bottom line, End User Error I suppose :)
If you set "Time per Frame" to 10 or 25 and start with triangulation you are not able to stop it with the "Stop" button, because it does not react. When "Time per Frame" is set to 250 the "Stop" button works as intended.