Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Refactor checklib.py as a module #213

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ratfink
Copy link
Collaborator

@Ratfink Ratfink commented Feb 16, 2018

Previously, comparelibs.py had to run a separate process for checklib.py. This meant loading a whole Python interpreter potentially hundreds of times for a large library with a lot of changes, making the script run fairly slowly.

This commit refactors checklib.py so it can be loaded as a module. comparelibs.py is also changed to use checklib.py as a module, avoiding having to start lots of subprocesses. This change makes comparelibs.py run in about 80% the time it used to (~33.5s vs ~27s on my machine) when comparing KiCad 4.0.7's device.lib to the current kicad-symbols Device.lib.

Previously, comparelibs.py had to run a separate process for
checklib.py.  This meant loading a whole Python interpreter potentially
hundreds of times for a large library with a lot of changes, making the
script run fairly slowly.

This commit refactors checklib.py so it can be loaded as a module.
comparelibs.py is also changed to use checklib.py this way.  This change
makes comparelibs.py run in about 80% the time it used to (~33.5s vs
~27s) when comparing KiCad 4.0.7's device.lib to the current
kicad-symbols Device.lib.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant