You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running import pyatlan.client.atlan takes around 7 seconds to complete. This takes far longer than I'd expect import statements to normally take (usually I'd expect it to take a small fraction of a second, and most libraries we use, such as Airflow, pandas, standard libaries, and more are all very fast to import).
Importing the atlan client actually takes much longer than instantiating it or making an Atlan API request which is very surprising.
Here's a piece of code that replicates this:
import time
t1 = time.time()
from pyatlan.client.atlan import AtlanClient
t2 = time.time()
print("atlan client import time (seconds):", t2 - t1)
t3 = time.time()
client = AtlanClient()
t4 = time.time()
print("atlan client instantiation time (seconds):", t4 - t3)
from pyatlan.model.assets import Table
t5 = time.time()
x = client.asset.get_by_guid(asset_type=Table, guid="d3c4d7a3-bec1-490c-9705-83059ffbf085")
t6 = time.time()
print("atlan client get table by guid time (seconds):", t6 - t5)
It outputs this on my machine:
atlan client import time (seconds): 7.337576866149902
atlan client instantiation time (seconds): 0.003535032272338867
atlan client get table by guid time (seconds): 1.0856139659881592
FYI: I've upgraded to pyatlan 2.1.7 and it has similar results:
atlan client import time (seconds): 6.82206916809082
atlan client instantiation time (seconds): 0.0039980411529541016
atlan client get table by guid time (seconds): 1.0934627056121826
Running
import pyatlan.client.atlan
takes around 7 seconds to complete. This takes far longer than I'd expect import statements to normally take (usually I'd expect it to take a small fraction of a second, and most libraries we use, such as Airflow, pandas, standard libaries, and more are all very fast to import).Importing the atlan client actually takes much longer than instantiating it or making an Atlan API request which is very surprising.
Here's a piece of code that replicates this:
It outputs this on my machine:
I'm on a macbook pro intel cpu.
I've seen a few issues around the web that are related and give some indication that its due to how pydantic is being used:
#187
pydantic/pydantic#6768
pydantic/pydantic#7263
Is this something that can be optimized/fixed?
The text was updated successfully, but these errors were encountered: