[Checkins] SVN: zopetoolkit/doc/src/ztksphinx.py Halve 'make html' time by having up to two threads for the same buildbot.
Marius Gedminas
marius at pov.lt
Wed Oct 13 21:50:07 EDT 2010
Log message for revision 117536:
Halve 'make html' time by having up to two threads for the same buildbot.
20s -> 12s. Using 3 threads brought the time down to 10s, but I'm not feeling
comfortable with three simultaneous HTTP requests for the same server.
Changed:
U zopetoolkit/doc/src/ztksphinx.py
-=-
Modified: zopetoolkit/doc/src/ztksphinx.py
===================================================================
--- zopetoolkit/doc/src/ztksphinx.py 2010-10-14 01:25:23 UTC (rev 117535)
+++ zopetoolkit/doc/src/ztksphinx.py 2010-10-14 01:50:07 UTC (rev 117536)
@@ -44,11 +44,15 @@
by_url.setdefault(url, []).append((node, builder))
jobs = []
for url, nodes in by_url.items():
- thread = threading.Thread(target=update_buildbot_nodes,
- args=(url, nodes),
- name=url)
- thread.start()
- jobs.append(thread)
+ pieces = [nodes[0::2], nodes[1::2]]
+ for n, nodes in enumerate(pieces):
+ if not nodes:
+ continue
+ thread = threading.Thread(target=update_buildbot_nodes,
+ args=(url, nodes),
+ name='%s-%d' % (url, n+1))
+ thread.start()
+ jobs.append(thread)
for thread in jobs:
thread.join()
finally:
More information about the checkins
mailing list