MyTooliT / ICOc

ICOc is a tool to control the ICOtronic system, acquire data, and test stationary transceiver units and sensory tool holders.
https://mytoolit.github.io/ICOc/
2 stars 0 forks source link

Import of Library is Slow #60

Open sanssecours opened 1 month ago

sanssecours commented 1 month ago

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
i7-1270P@3.50/4.80GHz M1 Max@2.0/3.2GHz i7-4702@2.2GHz
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:

repeated each measurement four times and calculated the average time.

sanssecours commented 1 month ago

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.