Opened 8 years ago

Closed 8 years ago

#4323 enhancement closed duplicate (duplicate)

Further ewstylization of twisted

Reported by: fijal Owned by:
Priority: normal Milestone:
Component: core Keywords: pypy
Cc: Branch:
Author:

Description

Twisted in places has old style classes. In places they're simply old style classes, in other places they have been hacked over, having a mixture of old and new style in mro. This is particularly unfriendly for PyPy (old style classes being unfriendly, but less so) and prevents Py3k conversion (a bit less of my concern).

Here are some benchmarks on names.py from https://code.launchpad.net/~exarkun/+junk/twisted-benchmarks (run at revision 14). For reference, on this machine CPython scores almost equally 11000 req/sec. Tests were run in chunks of 5 for 5s each (names.py -n 5 -d 5).

PyPy with JIT:

7978 names/sec (39890 names in 5 seconds) 13720 names/sec (68600 names in 5 seconds) 14412 names/sec (72060 names in 5 seconds) 14178 names/sec (70890 names in 5 seconds) 14616 names/sec (73080 names in 5 seconds)

twisted.internet.protocol.AbstractDatagramProtocol being new-style class

8684 names/sec (43420 names in 5 seconds) 14704 names/sec (73520 names in 5 seconds) 14978 names/sec (74890 names in 5 seconds) 15000 names/sec (75000 names in 5 seconds) 15122 names/sec (75610 names in 5 seconds)

the same as above plus all base classes of twisted.internet.udp.Port becoming newstyle classes (twisted.persisted.styles.Ephemeral and twisted.python.log.Logger).

The latter change is probably slightly more controversial, since some of those classes are exported, but I don't know how crucial that is.

Change History (2)

comment:1 Changed 8 years ago by fijal

Resolution: duplicate
Status: newclosed
Summary: Newstylization of twistedFurther ewstylization of twisted

Holy crap, I hate trac, recreating

comment:2 Changed 7 years ago by <automation>

Owner: Glyph deleted
Note: See TracTickets for help on using tickets.