[Inteproxy-commits] r325 - in branches/streaming: . inteproxy
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Dec 23 18:49:24 CET 2011
Author: teichmann
Date: 2011-12-23 18:49:22 +0100 (Fri, 23 Dec 2011)
New Revision: 325
Modified:
branches/streaming/ChangeLog
branches/streaming/inteproxy/proxycore.py
Log:
use rfind() instead of find() to boost the performance while using the streaming/rewriting mode.
Modified: branches/streaming/ChangeLog
===================================================================
--- branches/streaming/ChangeLog 2011-12-23 17:16:09 UTC (rev 324)
+++ branches/streaming/ChangeLog 2011-12-23 17:49:22 UTC (rev 325)
@@ -1,5 +1,11 @@
2011-12-23 Sascha L. Teichmann <sascha.teichmann at intevation.de>
+ * inteproxy/proxycore.py(transfer_chunked_rewrite): Use rfind()
+ instead of find() to break input into lesser fragments. This
+ improves the performance a lot!
+
+2011-12-23 Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
* inteproxy/proxycore.py(transfer_chunked_rewrite): Added method
to stream the data from incoming response to the output in chunks
transcoding the URLs on the run. TODO: Integrate it.
Modified: branches/streaming/inteproxy/proxycore.py
===================================================================
--- branches/streaming/inteproxy/proxycore.py 2011-12-23 17:16:09 UTC (rev 324)
+++ branches/streaming/inteproxy/proxycore.py 2011-12-23 17:49:22 UTC (rev 325)
@@ -363,7 +363,7 @@
pos = 0
while True:
- idx = chunk.find(separator, pos)
+ idx = chunk.rfind(separator, pos)
if idx > 0:
rest = chunk[pos:idx]
More information about the Inteproxy-commits
mailing list