If you developed an application or model in Python and you want to reduce loading times I recommend:
- Search the list of modules that you import
- Check the loading time of each module using e.g. the time module in Python
- Create modified copies of the modules causing long loading times
- Edit the modified copies of those modules by e.g. removing code that you do not need for your model of application, or by refactoring existing code
Example:
t = time.time()
# import random
from random import randint
print(time.time() – t)
Loading random took my application 0.06 seconds. Since I am developing an extensive simulation model, and every component inside my model uses random, I created a modified version of the random module. This reduced loading time by factor 10.