-
-
Notifications
You must be signed in to change notification settings - Fork 201
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
kikit stalls from plugin, but fast from CLI #713
Comments
Could you try the upstream version? There were some significant changes in the way GUI operates, so I want to be sure the problem is present. The only difference between CLI and GUI is that after successful penalization, GUI has to copy the panel into the currently open window. It is possible there might be some inefficiency there, I will check it out. |
I can try that, but it will probably take me a day to get to it. |
OK, I have not tried anything new yet.
|
The GUI is part of the backend. The KiCAD plugin is just a tiny loader. Definitely try to reproduce this with the v1.6.0. At the moment, there is no point in trying upstream version as it is the same as the just released v1.6.0. |
Update to this issue, using newly updated:
In brief testing I was not able to get kikit to complete error free. Here's a list of what I noted along the way.
Conclusions:
JSON settings used:
|
+1 Can we download the 1.5.x version (unofficial upstream version) that was before the 1.6.0 release? |
Conversation on this issue seems to have stalled. Anything we can do to help diagnose this issue? |
I've never use the CLI but since installing the latest update KiKit has been painfully slow whe I use it with the UI, and this issue looks like the reason why. I now find myself waiting up to 20 minutes for it to panelise some boards despite my computer CPU's GPU's and disks doing very little for most of that time. |
Yeah, it's a bit disappointing that this hasn't been addressed, and I'm still hoping for some suggestion as to how to help diagnose the problem. But that said, it's well worth trying out the command line approach, which is both fast and actually quite convenient. So I encourage you to try it out and not get stalled with the GUI issue. |
@gwideman: No one so far has been able to give me step-by-step instructions on how to reproduce the issue. All inputs were processed, but none of them led to a crash. Believe me, it is really hard to fix a bug that you cannot trigger. Saying "Hey, I also suffer from this" without providing any other info is not helping. I know that there are users suffering from this issues, but that's it. Your reports are better, but e.g., you haven't provided the input files. It is definitely possible that KiKit does something shady (we are on the edge of what the API allows for), however, a specific combination of something triggers this erroneous behavior. And I wasn't able to trigger it so far, hence, I cannot diagnose it.
The intended KiKit workflow is:
Why? KiCAD's API regarding DRC, project, paper size is non-existent. We handle these cases via direct manipulation of the output files. And there is no way in the current API to bring these changes into the currently opened file in Pcbnew However, people complained that this is not what they want. They want to click in the GUI and directly use the output. Hence, the change of GUI - we ask the user for the output file so the user gets a valid file. And we render a huge text warning that says, you are not supposed save this preview, but instead, use the file on the disk. |
FYI: I just rebased an experimental branch (ui_stall) on top of current upstream. It is a long shot, but it could help here. Overall, the changes made should ensure the OS doesn't consider KiCAD to be frozen. Could you try installing it via pip install https://github.com/yaqwsx/KiKit/archive/ui_stall.zip and test if it addresses this issue? |
Maybe there is no crash, but its just taking so long that some people think it has crashed, and kill the process using the task manager? - this is what I did a few times with the latest update before I discovered that I just had to leave it for as long as it needed. I also found that the time it takes to run varies significantly with the complexity of the board design, and boards that take longer to panelise in Kikit also take longer to open in KiCad Its been suggested that the problem may be to do with loading the panel data into the preview window? If this is the case then is it possible to include a work around in the UI with a checkbox to 'show preview' ... or something like that? Its a slightly less convienient workflow but re-openming the finished file to check it would be far faster than waiting for Kikit to finish and load the preview ... assuming that is the cause. |
As there are file operations, the GUI works in the following way:
The experimental branch I'll wait for the feedback of the affected users, then I will decide what we can do about it (though, looking at the current API, I am afraid, not much). |
If you can track down which KiKit version is fast, I can compare them. As I generally struggle to reproduce this issue, I can't do it on my own. |
All I can tell you is that it got slow when I upgraded to the version that askes for an output file. All the versions before this were fast for me. If it helps, I am on Windows 10, on a Dell precision mobile workstation with a CPU that is just old enough to be non-upgradeable to windows 11. |
To avoid hunting ghosts, could you install the version you are referring to, validate that it is actually faster/not stalling, and give me the precise version number? |
Prerequisites
KiKit version
kikit, version 1.5.1
KiCAD version
8.0.3
Operating system
Windows 10 Pro 10.0.19045
Description
This report may have insufficient detail to spot a cause, but I'm hoping for suggestions on how to help narrow down that cause.
Symptom:
A panelization job, as specified in a json file, runs in seconds from the command line, but when launched from the Kicad PCB kikit plugin UI "Panelize" button, the kikit process stalls for several minutes.
Sample stall time: For a 35x35mm board with 5 SMD ICs and a few dozen other SMD parts, to be panelized 3x4 boards, from CLI it runs in 6 seconds. From plugin UI, it runs in 5 minutes.
Stall time does vary with complexity. A 20mm square board with just one SMD transistor panelized 3x4 takes less than 2 secs for CLI, but 7 secs from plugin UI, so hard to notice much difference.
I have seen this symptom on all of the four boards I tried, on two different PCs, with significantly different kikit parameters (eg: mousebite tabs vs vcuts). I did not see any boards on which kikit UI ran without stalling.
When launched from GUI, the progress bar advances to a certain point (position varies: one example boards stalls at say 10%, another say 40%), then stops there for the majority of the several minutes, then suddenly sprints to 100%.
Inspecting the stalled kikit in Windows Resource monitor, there's no high disk activity (ie: no obvious virtual memory disk thrashing). CPU is about 12%, which is 100% of one "logical processor" on my "4-core, 8 logical processor" i7-6700 machine.
Steps to Reproduce
Of course, if you don't see the stall, then there's some factor outside this repro setup that's somehow in play.
The text was updated successfully, but these errors were encountered: