1 |
commit: a629f11a0fa140bfd85baeefaf99c5896f972acc |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun May 27 04:05:27 2018 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 27 04:08:50 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=a629f11a |
7 |
|
8 |
AbstractPollTask._read_array: document performance |
9 |
|
10 |
A benchmark that copies bytes from /dev/zero to /dev/null shows |
11 |
that arrays give a 15% performance improvement for Python 2.7.14. |
12 |
However, arrays significantly *decrease* performance for Python 3. |
13 |
|
14 |
Also, remove obsolete documentation about the POLLIN bit. |
15 |
|
16 |
pym/_emerge/AbstractPollTask.py | 12 +++--------- |
17 |
1 file changed, 3 insertions(+), 9 deletions(-) |
18 |
|
19 |
diff --git a/pym/_emerge/AbstractPollTask.py b/pym/_emerge/AbstractPollTask.py |
20 |
index f898aa708..4157794c6 100644 |
21 |
--- a/pym/_emerge/AbstractPollTask.py |
22 |
+++ b/pym/_emerge/AbstractPollTask.py |
23 |
@@ -25,15 +25,9 @@ class AbstractPollTask(AsynchronousTask): |
24 |
because it has bugs in all known versions of Python (including |
25 |
Python 2.7 and Python 3.2). See PipeReaderArrayTestCase. |
26 |
|
27 |
- | POLLIN | RETURN |
28 |
- | BIT | VALUE |
29 |
- | --------------------------------------------------- |
30 |
- | 1 | Read self._bufsize into an instance of |
31 |
- | | array.array('B') and return it, handling |
32 |
- | | EOFError and IOError. An empty array |
33 |
- | | indicates EOF. |
34 |
- | --------------------------------------------------- |
35 |
- | 0 | None |
36 |
+ A benchmark that copies bytes from /dev/zero to /dev/null shows |
37 |
+ that arrays give a 15% performance improvement for Python 2.7.14. |
38 |
+ However, arrays significantly *decrease* performance for Python 3. |
39 |
""" |
40 |
buf = array.array('B') |
41 |
try: |