MIME-Version: | 1.0 |
X-Spam-Status: | No, score=-2.699 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham |
X-Mailer: | Yamail [ http://yandex.ru ] 5.0 |
X-Spam-Flag: | NO |
X-Virus-Checked: | Checked |
Content-Type: | multipart/mixed; boundary="----==--bound.92868.web6h.yandex.ru" |
Message-ID: | <928671448381506 [...] web6h.yandex.ru> |
X-Virus-Scanned: | Debian amavisd-new at bestpractical.com |
X-Spam-Score: | -2.699 |
Received: | from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 65FD6240310 for <cpan-bug+http-body [...] hipster.bestpractical.com>; Tue, 24 Nov 2015 11:12:06 -0500 (EST) |
Received: | from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aw-TD-+8xhTM for <cpan-bug+http-body [...] hipster.bestpractical.com>; Tue, 24 Nov 2015 11:12:04 -0500 (EST) |
Received: | from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 9EA73240305 for <bug-http-body [...] rt.cpan.org>; Tue, 24 Nov 2015 11:12:03 -0500 (EST) |
Received: | (qmail 25344 invoked by alias); 24 Nov 2015 16:12:03 -0000 |
Received: | from forward2h.mail.yandex.net (HELO forward2h.mail.yandex.net) (84.201.187.147) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Tue, 24 Nov 2015 08:11:52 -0800 |
Received: | from web6h.yandex.ru (web6h.yandex.ru [IPv6:2a02:6b8:0:f05::16]) by forward2h.mail.yandex.net (Yandex) with ESMTP id B6D44700999 for <bug-http-body [...] rt.cpan.org>; Tue, 24 Nov 2015 19:11:47 +0300 (MSK) |
Received: | from 127.0.0.1 (localhost [127.0.0.1]) by web6h.yandex.ru (Yandex) with ESMTP id 3B68F278270A; Tue, 24 Nov 2015 19:11:47 +0300 (MSK) |
Received: | by web6h.yandex.ru with HTTP; Tue, 24 Nov 2015 19:11:46 +0300 |
Authentication-Results: | hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] yandex.ru |
Delivered-To: | cpan-bug+http-body [...] hipster.bestpractical.com |
Subject: | new feature for HTTP::Body::OctetStream - use memory buffer instead temp file for small bodies |
Return-Path: | <zhurs [...] yandex.ru> |
X-RT-Mail-Extension: | http-body |
X-Original-To: | cpan-bug+http-body [...] hipster.bestpractical.com |
X-Spam-Check-BY: | la.mx.develooper.com |
Dkim-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1448381507; bh=oJcEpI3/1HoiqU8m1pSEPHNTLSyaPeKJ82C6OEJVqaI=; h=From:To:Subject:Date; b=LEEI9G2Zv4nEdx83UjoApiq1cZUM62W5kKdK4vAOzR7Zn0JE0rqOQ6pTFZ0zJxq/t LyoVCOmoJCJhTumxtn3ctUXAsiHOQ0278h/xg+pyfli/Zd3DblbtNP7Juxu/zBv26M kOAFu0x/wxn4J4C1hqgIK9yLRJZfYDpaIxKyV7qY= |
Date: | Tue, 24 Nov 2015 19:11:46 +0300 |
X-Spam-Level: | |
To: | bug-http-body [...] rt.cpan.org |
From: | Сергей Журавлёв <zhurs [...] yandex.ru> |
X-RT-Interface: | |
Content-Length: | 0 |
content-type: | text/plain; charset="utf-8" |
Content-Transfer-Encoding: | 7bit |
X-RT-Original-Encoding: | ascii |
Content-Length: | 489 |
Hello,
We have json API, built using Plack, so every request have Content-Type: application/json.
Plack uses HTTP::Body, that choose HTTP::Body::OctetStream for this type of requests,
and create new temporary file for each request.
It hurts performance of our service.
So, I make patch, which uses PerlIO if body is small and File::Temp for big queries.
Also it is possible to tune behaviour through shared variable MAX_BUFFER_SIZE.
Please, consider to include patch into distribution.
Content-Type: | text/x-diff; name="buffered-octet-stream.patch" |
Content-Disposition: | attachment; filename="buffered-octet-stream.patch" |
Content-Transfer-Encoding: | base64 |
Content-Length: | 4069 |
Message body is not shown because sender requested not to inline it.