Closed SimonMerrett closed 3 years ago
With optimizations I prefer to follow the first rule of optimizations:
Now to get a bit more serious:
I hope I've presented my view, my reservations and general "lay of the land" well enough for you to understand. As such I'll not accept any PR in master branch (5.1.x) and any PR to 5.99_branch will be delayed until I port the plugin fully to stable 5.99/V6 python API.
@MitjaNemec thanks for that thorough appraisal. I am happy to hold back and grateful for the insight. I may be better off making a python standalone script to parse an extracted set of traces/modules into a separate pcbnew file in the array desired.
I may be better off making a python standalone script to parse an extracted set of traces/modules into a separate pcbnew file in the array desired.
I did not get this. Could you elaborate a bit on your workflow. I think that your workflow is outside of the main plugin intention
Sure - I meant to completely ignore all plugin workflow, take a pcbnew file containing a single instance of each track and module I want and then use python to write a new kicad pcb file containing multiple instances of each module and trace, with the coordinates adjusted. Thank the Lord for ascii file formats!
I don't see how this is connected to the speed of my plugin.
From my experience, I've found out that I'd appreciate faster execution only when the layout requires a lot of iterations (lay out one sheet, replicate, modify one sheet, replicate, modify one sheet, replicate, ....) where layout of source sheet depends on the layout of destination sheets. In these cases you often need to also tick delete duplicates
checkbox, which is really a resource hog.
My plan going forward is not to do with your plugin - I only mentioned what I am planning to do out of interest in case someone else wants to do something similar to me and can't think of any alternative. Sorry for the confusion.
I have over 500 copies of a particular sheet to lay out. I am manually deleting tracks and zones with the selection filter before running replicator so as to avoid using the delete duplicates option.
No worries. Part of communicatio.
With 500 copies I can see why the need for speed.
I've never had a plugin user eport more than 10 copies.
Hi, I am not a python-competent coder by any means but having said that, I would be prepared to contribute if the developers/maintainers of this fine repository would be able to support me doing so by helping get up to speed with the replication codebase and what the most fruitful routines to optimise would be.
I am watching a well specc'ed PC spend hours replicating a fairly large array of circuits in a matrix using only one of the 8 cores available to it. My understanding is that is due to the single thread limitations of Python and that multicore Python is possible for certain types of program using the multiprocessing module's Process and Pool classes.
Has this been considered in the past and would anyone be prepared to guide me on how best to make replication a multithread plugin? Link to an article which made me think it might be feasible.
EDIT: For example, I have just had a look at the replicator code and (bearing in mind that replicating footprints/modules and tracks is my main interest and seemed to take the longest durations on the progress bar) would it make sense to look at multiprocessing
replicate_modules()
andreplicate_tracks()
first?