> We could also buffer everything to offload thread memory buffer by default
> and if buffer hits maximum size we could switch to temporary file (?)
> Just the idea of pushing every response immediately to offload thread so
> that once it's done worker can process another request, while the offload
> thread handles delivering our response to the client, seems nice for me.
>

I have committed to "offload" transformation (it will be built by default
from 1.9.12).

It is not too much complex:

https://github.com/unbit/uwsgi/blob/master/plugins/transformation_offload/offload.c

Basically if you add --route-run offload:

the write of the response will be offloaded.

By default after the response grows over 1 MB it will start being buffered
to disk (and the offload will became a sendfile() offload)

You can tune that value passing the number of bytes to the offload:

--route-run offload:100

will buffer to disk after 100 bytes



-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to