python startup very slow on win2000

A

angel

Hi

I use python on win2000.I found python perhaps spend 10~15 second on
starting. How to accelerate it?

Thanx
 
D

Derek Thomson

Hi

I use python on win2000.I found python perhaps spend 10~15 second on
starting. How to accelerate it?

I'm running Python 2.3.3 on Windows 2000 here at work, and while the
startup time isn't great (about 1 second) compared with Linux at home,
it's nowhere near that bad.

Is there some other process taking a lot of CPU time or RAM? Are you
talking about just starting Python itself - or are you running some
program written in Python? How long does it take just to start the
Python command-line shell by itself?

dt.
 
M

Michel Claveau, résurectionné d'outre-bombe inform

Hi !

Do you use a soft anti-virus ? Look his parameters (exclude \Python23).
 
A

angel

The cpu of my system is P3 1G, memory is 1G. The preformance is good when
runing other application. But running python is terrible, pythonwin.exe will
speed 30 second on startup. "python.exe -i" on command line will speed 10
second on startup.


"Michel Claveau, résurectionn?d'outre-bombe informatique"
 
P

Peter Hansen

angel said:
I use python on win2000.I found python perhaps spend 10~15 second on
starting. How to accelerate it?

There is something wrong or unexpected with your setup. Check
for problems with the PATH (folders that map to missing network
shares and such), virus scanning software (as Michel mentioned
but you sort of ignored in your response), and other such things.
Python itself definitely will not take that long on a properly
configured system, IME.

-Peter
 
D

Dominic

angel said:
Hi

I use python on win2000.I found python perhaps spend 10~15 second on
win2000 is quite slow on systems with little memory. (<=128 MB)

On my notebook it also takes some time to start Python,
because the hd is quite slow.
starting. How to accelerate it?
Buy more memory and a fast hd.

Or fix Python. Maybe stuffing all
library py-files in a
(memory mapped) file may
help. ;-)
 
A

angel

Thanx for your help.

I have checked every thing you had mentioned,but no result.
There is jython2.1 on my system. jython startup is fast, just 2~3 second.
How strange is it!
Dose python need configure? For example: PATH or other?
 
M

Michel Claveau, résurectionné d'outre-bombe inform

Re-Hi !

On my Vaio (P3 - 3,2 Ghz - 1 Go) Python-2.3 run a typical script in 11 s ;
after STRONG optimization of XP and Norton-anti-virus, it run in 4 s (the
first run) and 2 s (other runs).

And it's similary with other softwares.
 
D

Dominic

Michel said:
Re-Hi !

On my Vaio (P3 - 3,2 Ghz - 1 Go) Python-2.3 run a typical script in 11 s ;
after STRONG optimization of XP and Norton-anti-virus, it run in 4 s (the
first run) and 2 s (other runs).
start-up subsecond range on Windows 98 SE, PII 400MHz, 320 MB RAM
1-2 seconds on my PIII 800 MHz, notebook, Windows XP
 
I

Istvan Albert

angel said:
Dose python need configure? For example: PATH or other?

do a:

python -vSEc "print 1"

maybe you can identify the source of the slowdown.

Istvan.
 
A

angel

How strange it is!
I test "python" and "python -vSE".
"python" startup time is 6-7 second, "python -vSE" just need 3 second.
 
J

Jeff Epler

Then you've at least learned something: Files loaded due to site.py, or
files on PYTHONPATH, add 3-4 seconds to start time.

However, 6-7 seconds for "python -vc 'print 1'" is still excessive.
That takes only 1/2 second here, and "python -c 'print 1'" takes 0.05
seconds (the difference being the time to print all the "-v" lines,
basically). (This is on an 650MHz Unix machine--A modern 2.7GHz Unix
machine I just tested took 0.005 seconds for "python -SEc 'print 1'")

The number one reason I've seen for slow Python startups are sys.path
directories on the network (from personal experience). Other problems
might be importing modules from directories without .pyc files and
without write permissions (Python must parse and byte-compile the source
files each time), or a module being imported attempts to do some
network-related activity, such as find the hostname, but your network is
misconfigured.

.... or it could be some obscure Microsoft Windows misconfiguration that
we'll never guess in a million years.

Jeff

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBCN2KJd01MZaTXX0RAmLPAJ9yABzwgDsUUBhHJm1DaryltwieRwCfVGTm
JSn5CHUgCm81NGJzujLtzOI=
=P998
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top