This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author thomasabc
Recipients
Date 2004-08-16.15:54:15
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The CPU usage of a python application program using 
asyncore.py shoot up to 99% under Python 2.4a1. After 
a comparison, it was found out that the same program 
ran without such high CPU usage under Python 2.3.3

A simple couple of programs to narrow down the problem 
showed that a single loop() was accompanied by a large 
number of poll() with 2.4a1, whereas a single loop() had 
only 3 calls to poll() with 2.3.3.

Please let me know if there is anything else I can do for 
you to analyse. A couple of python scripts are attached 
in a zip file for you as below:

- Summary of the test scripts

With these scripts, the test attempts to identify what 
function calls are called that might explain the high CPU 
usage observed.

asyncore_test.py:
Taken from the Python Library Reference 11.24.2 
asynchat Example, the test program starts a server 
process to simulate client request process.

http_test.py:
This program simply establishes connection to the server 
and closes after 10 seconds.

- Procedure

1. Start asyncore_test.py
2. Start http_test.py
3. Stop asyncore_test.py
History
Date User Action Args
2007-08-23 14:25:21adminlinkissue1010098 messages
2007-08-23 14:25:21admincreate