- 28 Şub, 2008 3 kayıt (commit)
-
-
Jeffrey Yasskin yazdı
new thread had started. At least on my MacBook Pro, that wound up sleeping for a full 10ms (probably 1 jiffy). By using an Event instead, we can be absolutely certain that the thread has started, and return more quickly (217us). Before: $ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()' 100 loops, best of 3: 10.3 msec per loop $ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()' 1000000 loops, best of 3: 0.47 usec per loop After: $ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()' 1000 loops, best of 3: 217 usec per loop $ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()' 1000000 loops, best of 3: 0.86 usec per loop To be fair, the 10ms isn't CPU time, and other threads including the spawned one get to run during it. There are also some slightly more complicated ways to get back the .4us in isAlive() if we want.
-
Jeffrey Yasskin yazdı
sure all tests run even if some fail.
-
Jeffrey Yasskin yazdı
which forbids constructing types that have it set. The effect is to speed ./python.exe -m timeit -s 'import abc' -s 'class Foo(object): __metaclass__ = abc.ABCMeta' 'Foo()' up from 2.5us to 0.201us. This fixes issue 1762.
-
- 27 Şub, 2008 3 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
Raymond Hettinger yazdı
-
Raymond Hettinger yazdı
-
- 26 Şub, 2008 11 kayıt (commit)
-
-
Raymond Hettinger yazdı
-
Georg Brandl yazdı
-
Christian Heimes yazdı
My tests don't show the promised speed up of 10%. The code is as fast as the old code for simple cases and slightly faster for complex cases with several of args and kwargs. But the patch simplifies the code, too.
-
Neal Norwitz yazdı
like waiting for socket timeouts in test_smtplib :-).
-
Christian Heimes yazdı
-
Neal Norwitz yazdı
(This may fail on some slow platforms, but we can fix those cases which should be relatively isolated and easier to find now.) Move two test cases that didn't require a server to be started to a separate TestCase. These tests were taking 3 seconds which is what the timeout was set to.
-
Georg Brandl yazdı
-
Neal Norwitz yazdı
-
Neal Norwitz yazdı
-
Neal Norwitz yazdı
Speed this test up by avoiding a sleep and using the event.
-
Raymond Hettinger yazdı
-
- 25 Şub, 2008 13 kayıt (commit)
-
-
Facundo Batista yazdı
-
Raymond Hettinger yazdı
-
Raymond Hettinger yazdı
-
Facundo Batista yazdı
failure in the shelve module. Thanks Thomas Herve.
-
Georg Brandl yazdı
-
Georg Brandl yazdı
-
Facundo Batista yazdı
Thanks Thomas Herve
-
Christian Heimes yazdı
Thomas Herve explained to me that PyCrypto depends on the constants. I'm adding the aliases because C code for Python 2.x should compile under 2.6 as well. The aliases aren't available in Python 3.x though.
-
Andrew M. Kuchling yazdı
-
Andrew M. Kuchling yazdı
-
Brett Cannon yazdı
-
Brett Cannon yazdı
-
Neal Norwitz yazdı
-
- 24 Şub, 2008 10 kayıt (commit)
-
-
Christian Heimes yazdı
stringobject, unicodeobject and the two formatters are rebuild whenever a header files changes
-
Eric Smith yazdı
-
Neal Norwitz yazdı
run the test simultaneously. The simplest thing I found that worked on both Windows and Unix was to use the PID. It's unique so should be sufficient. This should prevent many of the spurious failures of the automated tests since they run as different users. Also cleanup the directory consistenly in the tearDown methods. It would be nice if someone ensured that the directories are always created with a consistent name.
-
Mark Dickinson yazdı
-
Christian Heimes yazdı
-
Neal Norwitz yazdı
-
Neal Norwitz yazdı
were two module_methods and the one used depended on the order the modules were loaded. By making the test module_methods static, it is not exported and the correct version is picked up.
-
Facundo Batista yazdı
Thanks Gabriel Genellina.
-
Neal Norwitz yazdı
Suggested by Raymond Hettinger.
-
Andrew M. Kuchling yazdı
-