[Twisted-web] static file performance
Thomas Hervé
therve at free.fr
Tue Mar 4 15:54:22 EST 2008
Phil Christensen a écrit :
> Hi All,
>
> The previous thread about http server performance made me think of
> something I've been meaning to ask about for a while.
>
> What is the best way to send static files to the client in
> twisted.web? I know web2 had some preliminary support for mmap for
> small files, but I know it didn't work the last time I checked, and
> I'm trying to stick with twisted.web for now, anyways.
>
> I've just been using Apache to serve static content, but I'd love to
> be able to use a pure-twisted solution.
If you use a supported platform (Linux, FreeBSD, maybe Leopard),
sendfile is the best way to get close to Apache performance on static
files. The ticket #585 (http://twistedmatrix.com/trac/ticket/585) is
where we try to do that. Unfortunately, this is a huge change, so it
requires huge energy to get it into Twisted :). So any help on this
ticket would be great: reviews, adding tests, performance measures, etc...
--
Thomas
More information about the Twisted-web
mailing list