473,467 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

2.3-2.5 what improved?

A large cgi based web Python-2.3 application needs to be speed improved.
experiments show the following under reasonable testing (these are 2 second
reportlab pdf productions)

1) 2.3 --2.5 improvement small 1-2%
2) cgi --fcgi improvement medium 10-12%

I sort of remember claims being made about 2.5 being 10% faster than 2.4/2.3 etc
etc. Can anyone say where the speedups were? Presumably we have a lot of old
cruft that could be improved in some way eg moving loops into comprehensions,
using iterator methods etc. Are those sort of things what we should look at?
--
Robin Becker

Jan 17 '07 #1
6 1264
Robin Becker wrote:
A large cgi based web Python-2.3 application needs to be speed improved.
experiments show the following under reasonable testing (these are 2
second reportlab pdf productions)

1) 2.3 --2.5 improvement small 1-2%
2) cgi --fcgi improvement medium 10-12%

I sort of remember claims being made about 2.5 being 10% faster than
2.4/2.3 etc etc. Can anyone say where the speedups were? Presumably we
have a lot of old cruft that could be improved in some way eg moving
loops into comprehensions, using iterator methods etc. Are those sort of
things what we should look at?
Python 2.5 became quite fat. For bare CGI the Python load/init
time eats all improvements. Smaller scripts even loose lot of speed.

I still like Python 2.3 for many other reasons for many
applications - especially for CGI's, on Windows, for deployable
apps, GUI's etc. because the fat coming with Python 2.4 is not
balanced by necessary goods - mostly just fancy things.
( I run even a list of patches and module copies/addaptations down
to 2.3 because of that :-) )

Real news come with Py3K
Robert
Jan 17 '07 #2

Robin Becker a écrit :
A large cgi based web Python-2.3 application needs to be speed improved.
experiments show the following under reasonable testing (these are 2 second
reportlab pdf productions)

1) 2.3 --2.5 improvement small 1-2%
2) cgi --fcgi improvement medium 10-12%

I sort of remember claims being made about 2.5 being 10% faster than 2.4/2.3 etc
etc. Can anyone say where the speedups were?
AFAIK, most of the speedup comes from optimization of the builtin dict
type, which is the central
data structure in Python. But anyway, as Robert pointed out, using CGI
means lauching
a new Python process for each and every HTTP request.
Presumably we have a lot of old
cruft that could be improved in some way eg moving loops into comprehensions,
using iterator methods etc. Are those sort of things what we should look at?
Consider profiling your code before doing anything else - unless you're
planning on wasting your time.

Jan 17 '07 #3

robert wrote
Robin Becker wrote:
A large cgi based web Python-2.3 application needs to be speed improved.
experiments show the following under reasonable testing (these are 2
second reportlab pdf productions)

1) 2.3 --2.5 improvement small 1-2%
2) cgi --fcgi improvement medium 10-12%

I sort of remember claims being made about 2.5 being 10% faster than
2.4/2.3 etc etc. Can anyone say where the speedups were? Presumably we
have a lot of old cruft that could be improved in some way eg moving
loops into comprehensions, using iterator methods etc. Are those sort of
things what we should look at?

Python 2.5 became quite fat. For bare CGI the Python load/init
time eats all improvements. Smaller scripts even loose lot of speed.
I still like Python 2.3 for many other reasons for many
applications - especially for CGI's, on Windows, for deployable
apps, GUI's etc. because the fat coming with Python 2.4 is not
balanced by necessary goods - mostly just fancy things.
What do you mean? Fat of libraries or fat itself?
I tought that 2.5 was faster than precedent versions! :-\

Jan 17 '07 #4
br*****************@gmail.com wrote:
Robin Becker a écrit :
........

AFAIK, most of the speedup comes from optimization of the builtin dict
type, which is the central
data structure in Python. But anyway, as Robert pointed out, using CGI
means lauching
a new Python process for each and every HTTP request.
>Presumably we have a lot of old
cruft that could be improved in some way eg moving loops into comprehensions,
using iterator methods etc. Are those sort of things what we should look at?

Consider profiling your code before doing anything else - unless you're
planning on wasting your time.
our major show stoppers(stuff like stringWidth) are already in C; the remainder
are rather complex methods to do things like paragraph splitting. We're already
considering fcgi to eliminate the startup time. A trial with psyco indicates
another 15% could be obtained there, but I don't think we can use that on the
target platform (which I think is sparc).
--
Robin Becker

Jan 17 '07 #5
billie a écrit :
robert wrote
>Robin Becker wrote:
>>A large cgi based web Python-2.3 application needs to be speed improved.
experiments show the following under reasonable testing (these are 2
second reportlab pdf productions)

1) 2.3 --2.5 improvement small 1-2%
2) cgi --fcgi improvement medium 10-12%

I sort of remember claims being made about 2.5 being 10% faster than
2.4/2.3 etc etc. Can anyone say where the speedups were? Presumably we
have a lot of old cruft that could be improved in some way eg moving
loops into comprehensions, using iterator methods etc. Are those sort of
things what we should look at?
Python 2.5 became quite fat. For bare CGI the Python load/init
time eats all improvements. Smaller scripts even loose lot of speed.
I still like Python 2.3 for many other reasons for many
applications - especially for CGI's, on Windows, for deployable
apps, GUI's etc. because the fat coming with Python 2.4 is not
balanced by necessary goods - mostly just fancy things.

What do you mean? Fat of libraries or fat itself?
I tought that 2.5 was faster than precedent versions! :-\
It is. But it takes a bit more time to launch the interpreter. Which is
barely noticiable in most cases, but can be start to be a problem with CGI.
Jan 17 '07 #6
At Wednesday 17/1/2007 10:29, billie wrote:
Python 2.5 became quite fat. For bare CGI the Python load/init
time eats all improvements. Smaller scripts even loose lot of speed.
What do you mean? Fat of libraries or fat itself?
I tought that 2.5 was faster than precedent versions! :-\
It runs faster, but has a slower start time. For CGI, when you launch
a new process with every request, this is bad.
(This is a general problem with CGI itself - perhaps one should
consider other alternatives, like FastCGI, mod_python, WSGI...)
--
Gabriel Genellina
Softlab SRL


__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas

Jan 17 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Delaney, Timothy C (Timothy) | last post by:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/286195 This is a new version of super that automatically determines which method needs to be called based on the existing stack frames....
5
by: barnesc | last post by:
I'm revising my vote. Thanks for the responses. I vote against: class foo: @synchronized @types("o,i,i") @author('Chris King')
3
by: Robert | last post by:
I am having performance issues on a SQL query in Access. My query is accessing and joining several tables (one very large one). The tables are linked ODBC. The client submits the query to the...
2
by: Michael A. Covington | last post by:
Has anyone created either... (1) a version of OpenFileDialog that can select folders, not just files; or (2) a version of FileBrowserDialog that is a little more user-friendly (more like...
4
by: Rob K. | last post by:
We have a DataMart (Approx 10GB) that is updated in batch at night. Is there a way that the database can be configured to be in a "Read Only" mode during the day? MS SQL offers this - improved...
0
by: jonathanbindel | last post by:
DC# is an improved DirectConnect client written in C# with many needed features such as cleanly implemented multisource downloading and automatic searching for alternates to get the best...
102
by: Xah Lee | last post by:
i had the pleasure to read the PHP's manual today. http://www.php.net/manual/en/ although Pretty Home Page is another criminal hack of the unix lineage, but if we are here to judge the quality...
0
by: DCole | last post by:
Does anyone know of a tool that will read a perfmon-generated log (.blg) file into a table so you can run better analytics on it than the simple System Monitor Control provides? Actually, any...
4
by: Charles Packer | last post by:
In these Javascript-driven time-lapse "movies" ... http://cpacker.org/trees can the cross-fade be improved? I was grateful to be able to find the script on the Web at...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.