ndexbio / ndex2-client

NDEx2 Client
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

import of ndex2 takes too long to run #85

Closed coleslaw481 closed 2 years ago

coleslaw481 commented 3 years ago

The import ndex2 takes too long. Looks like the code is querying the NDEx server to see if it supports v2 endpoints. This should just be removed or at the least deferred until a user invokes a method that actually interacts with the NDEx server

coleslaw481 commented 2 years ago

So did some further digging and it turns out the real culprit is the import of pandas and networkx in nice_cx_newtork module which is imported at the end of __init__.py. These two imports add about 0.5 second delay.

Due to the wide usage of networkx and pandas in NiceCXNetwork which is used in functions in __init__.py I don't see a clean way of doing a lazy load of these packages. Going to just close this ticket.