On Jun 22, 2012, at 2:52 PM, Peter Westlake <peter.westlake(a)pobox.com> wrote:
> On Thu, Jun 21, 2012, at 10:16, Glyph wrote:
>>
>> Le Jun 21, 2012 à 6:52 AM, Peter Westlake <peter.westlake(a)pobox.com> a
>> écrit :
>>
>>> How fast is rendering in nevow? I have a page which is mostly a large
>>> table with a couple of hundred rows, each containing a form. The
>>> generated HTML is about 500 KB. Leaving aside the question of whether
>>> this is a good design or not, how long would you expect it to take? I'm
>>> interested specifically in what happens between the end of beforeRender
>>> and the request being completed. It takes about a minute and a quarter.
>>> Is that normal, or is there a delay in my code that I haven't found yet?
>>>
>>> Thanks,
>>>
>>> Peter.
>>
>> What does your profiler tell you?
>
> There's a profiler? There's a profiler! There it is,
> right up there at the top of the man page! Thank you!
Not only is there a profiler, there's benchmarks!
<http://speed.twistedmatrix.com/timeline/>
Maybe you could add one for twisted.web.template rendering speed?
> Peter.
>
> P.S. sorry, this was really meant to go to the twisted-web list.
> I suspect a last-minute substitution by my email client.
Thanks for the thought, at least. Cross-posted.
-glyph
On behalf of Twisted Matrix Laboratories, I am pleased to announce, in
extremis, the release of Twisted 12.3.
161 tickets are closed by this release, with the following highlights:
* Support for local parallel testing in trial
* A new "react" function to easily run a single asynchronous function
in a script with the reactor.
* Partial support for Python 3.3.
Note that only Python 2.7 is supported on Windows now. We also require
zope.interface 3.6.0 or newer.
For more information, see the NEWS file here:
http://twistedmatrix.com/Releases/Twisted/12.3/NEWS.txt
Download it now from:
http://pypi.python.org/packages/source/T/Twisted/Twisted-12.3.0.tar.bz2 or
http://pypi.python.org/packages/2.7/T/Twisted/Twisted-12.3.0.win32-py2.7.msi
Thanks to the supporters of Twisted via the Software Freedom Conservancy
and to the many contributors for this release.
--
Thomas
tks, i will learning twisted in depth.
It's really powerful and widely used in cloud platform.
2012/12/25 <twisted-web-request(a)twistedmatrix.com>
> Send Twisted-web mailing list submissions to
> twisted-web(a)twistedmatrix.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
> or, via email, send a message with subject or body 'help' to
> twisted-web-request(a)twistedmatrix.com
>
> You can reach the person managing the list at
> twisted-web-owner(a)twistedmatrix.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Twisted-web digest..."
>
>
> Today's Topics:
>
> 1. (no subject) (Levi Nie)
> 2. Re: (no subject) (exarkun(a)twistedmatrix.com)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 24 Dec 2012 12:18:18 +0800
> From: Levi Nie <levinie001(a)gmail.com>
> Subject: [Twisted-web] (no subject)
> To: twisted-web(a)twistedmatrix.com
> Message-ID:
> <CAEMsKDvg+=
> Trvvtg_gSrBe8EOr2DiSdkfqYgOXZ_Kd2hRRTN4Q(a)mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> ok, i'm new to twisted web.
>
> when a server.Site is inited with resource.Resource and the protocol is
> http.HTTPChannel. how the two(Resource and protocol) work.
>
ok, i'm new to twisted web.
when a server.Site is inited with resource.Resource and the protocol is
http.HTTPChannel. how the two(Resource and protocol) work.
Hello
The code suggests it does - but I can't get it to work.
class ProxyAgent(_AgentBase):
"""
An HTTP agent able to cross HTTP proxies.
@ivar _proxyEndpoint: The endpoint used to connect to the proxy.
@since: 11.1
"""
def __init__(self, endpoint, reactor=None, pool=None):
if reactor is None:
from twisted.internet import reactor
_AgentBase.__init__(self, reactor, pool)
self._proxyEndpoint = endpoint
def request(self, method, uri, headers=None, bodyProducer=None):
"""
Issue a new request via the configured proxy.
"""
# Cache *all* connections under the same key, since we are only
# connecting to a single destination, the proxy:
key = ("http-proxy", self._proxyEndpoint)
# To support proxying HTTPS via CONNECT, we will use key
# ("http-proxy-CONNECT", scheme, host, port), and an endpoint that
# wraps _proxyEndpoint with an additional callback to do the
CONNECT.
return self._requestWithEndpoint(key, self._proxyEndpoint, method,
_parse(uri), headers, bodyProducer,
uri)
The "Using a http proxy" -
http://twistedmatrix.com/documents/current/web/howto/client.html works,
provided the target url is http ( not https as shown in the example ).
I'm attempting to adapt this example to confirm https proxing is possible
from twisted.python.log import err
from twisted.web.client import ProxyAgent
from twisted.internet import reactor
from twisted.internet.endpoints import TCP4ClientEndpoint
def display(response):
print "Received response"
print response
def main():
endpoint = TCP4ClientEndpoint(reactor, "localhost", 8000)
agent = ProxyAgent(endpoint)
d = agent.request("GET", "https://example.com/")
d.addCallbacks(display, err)
d.addCallback(lambda ignored: reactor.stop())
reactor.run()
if __name__ == "__main__":
main()
I've tried changing the endpoint to SSL4ClientEndpoint without success.
Any help, much appreciated
- G