Currently, starup time for the CLI is about 0.5 seconds and is about 0.28 seconds for import geoips. Both are too long. The problem is entirely confined to imports where imports take 0.447 seconds for the CLI and 0.27 seconds for import geoips. We should investigate several things:
- [ ] Determine whether we are profiling correctly.
- [ ] Why does the CLI take twice as long to load as `import geoips`?
- [ ] Which imports are slowest?
Once slow points are identified, we should determine whether we can address them or if "it is what it is" and we should just let it go. If we decide to let it go, we should document why in this issue prior to closing.
Background and Motivation
The CLI loads slowly.
Useful tools for profiling
The script below can be used to generate a pstats file using cProfile and generate dot-graphs from that pstats file. Another nice tool is snakeviz which gives a more dynamic view of the pstats results.
Requested Update
Description
Currently, starup time for the CLI is about 0.5 seconds and is about 0.28 seconds for
import geoips
. Both are too long. The problem is entirely confined to imports where imports take 0.447 seconds for the CLI and 0.27 seconds forimport geoips
. We should investigate several things:Once slow points are identified, we should determine whether we can address them or if "it is what it is" and we should just let it go. If we decide to let it go, we should document why in this issue prior to closing.
Background and Motivation
The CLI loads slowly.
Useful tools for profiling
The script below can be used to generate a
pstats
file using cProfile and generate dot-graphs from thatpstats
file. Another nice tool issnakeviz
which gives a more dynamic view of thepstats
results.Checklist for Completion