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

Import of Library is Slow #60

Open
sanssecours opened this issue Jul 1, 2024 · 1 comment
Open

Import of Library is Slow #60

sanssecours opened this issue Jul 1, 2024 · 1 comment
Labels
performance Problems regarding the performance of code

Comments

@sanssecours
Copy link
Member

sanssecours commented Jul 1, 2024

Description

Importing the Network class takes quite some amount of time depending on the platform and hardware. Below are some examples:

Linux NUC MacBook Pro Windows NUC
[email protected]/4.80GHz M1 [email protected]/3.2GHz [email protected]
Python 3.12.3 Python 3.12.4 Python 3.12.4
~ 2.0325 s ~ 0.987 s ~ 5.092 s

I used the following commands for the measurement:

  • Linux/macOS: time python -c 'from mytoolit.can import Network'
  • Windows: Measure-Command { python -c 'from mytoolit.can import Network' }

repeated each measurement four times and calculated the average time.

@sanssecours sanssecours added the performance Problems regarding the performance of code label Jul 1, 2024
@sanssecours
Copy link
Member Author

sanssecours commented Jul 3, 2024

Looks like the biggest contributor (56.2 %) to the slow import time is the tables library. At least that is what I gathered after executing:

python3 -X importtime -c "from mytoolit.can import Network" 2> read.prof

and checking the result with Tuna:

Import Times

on the Linux NUC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance Problems regarding the performance of code
Projects
None yet
Development

No branches or pull requests

1 participant