Python scripts efficiency with or without functions import

54 views Asked by At

I wrote a script which tends to be long (about 2000 lines) and which actually contains a collection of functions. When I run the script I select a function through a command line argument and run this specific function. This script is actually a set of tools.

I noted that it takes some times before the script really start maybe due to module importations or python stuffs. Thus I wonder what is the best thing to do to make it quicker ? Does it will be quicker if all the functions were in a separate module file which will be precompiled by python (.pyc format) ?

0

There are 0 answers