Skip to content
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

feat: speed up imports #363

Merged
merged 4 commits into from
Dec 1, 2021
Merged

feat: speed up imports #363

merged 4 commits into from
Dec 1, 2021

Conversation

redeboer
Copy link
Member

@redeboer redeboer commented Dec 1, 2021

Import expensive modules inline to speed up importing tensorwaves. This makes import tensorwaves (and collecting tests) about 8x as fast. Profiling done with tuna as follows (see stackoverflow):

python3 -X importtime -c "import tensorwaves" 2> tw.log && tuna tw.log

@redeboer redeboer added the 🔨 Maintenance Maintenance and upkeep improvements label Dec 1, 2021
@redeboer redeboer added this to the 0.4.0 milestone Dec 1, 2021
@redeboer redeboer self-assigned this Dec 1, 2021
@redeboer redeboer enabled auto-merge (squash) December 1, 2021 18:47
@redeboer redeboer merged commit 641f458 into ComPWA:main Dec 1, 2021
@redeboer redeboer deleted the speed-up-imports branch December 1, 2021 19:03
redeboer added a commit that referenced this pull request Dec 7, 2021
* chore: import AmpForm inline
* chore: import SciPy
* chore: import TF modules inline
* ci: run mypy in tox sty job through pre-commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 Maintenance Maintenance and upkeep improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant