Delay in python startup.
Chris Angelico
rosuav at gmail.com
Mon Sep 30 12:54:18 EDT 2019
More information about the Python-list mailing list
Mon Sep 30 12:54:18 EDT 2019
- Previous message (by thread): Delay in python startup.
- Next message (by thread): Delay in python startup.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, Oct 1, 2019 at 1:56 AM Tobiah <toby at tobiah.org> wrote: > > I don't have a lot of information, so here goes a shot in > the dark. One day I started experiencing a delay when > starting python. I'm on Ubuntu 16.04. It takes three > seconds to get a prompt when I type 'python' on the command > line (Python 2.7.12). When I run a script that imports > packages, it takes longer, up to 17 seconds just to do > the imports. Python3 is not affected, and is snappy as > expected. > > That's all I know. I'm hoping someone else has seen this. > I'm about ready to wipe the drive and upgrade to 18.04. > Python 2 and Python 3 have completely independent installations, so it could be a lot of things. First question: Does it take three seconds *every* time you type 'python', or only the first time? If it's slow the first time but then fast, it's probably just a matter of disk caching; running Python 3 doesn't pre-cache the files for Python 2, so you have to pay the load-time cost anew. If it's slow every time, though, you may have something messing with your startup. Try "python -S" and "python -E" see if they're just as slow. That would be a way to delve into things a bit. ChrisA
- Previous message (by thread): Delay in python startup.
- Next message (by thread): Delay in python startup.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list