PROPOSAL: temp stream for post_data

From: Date: Tue, 27 Aug 2013 12:08:26 +0000
Subject: PROPOSAL: temp stream for post_data
Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Hi,

I prepared a patch to replace sapi_globals' request_info post_data and
raw_post_data with a temp stream and remove support for
HTTP_RAW_POST_DATA. [1]

PROS:
* save up to 300% on post_data_len memory (on non-form POSTs)
* a local siege (c=512/512, 2.4k form/2.2k json) showed no (negative)
performance impact; see attached logs
* reusable php://input stream
* ...

CONS:
* no more $HTTP_RAW_POST_DATA, where BC could easily provided with a one-liner:
$GLOBALS["HTTP_RAW_POST_DATA"]=file_get_contents("php://input");
* memory is cheap
* ???


[1] https://github.com/m6w6/php-src/compare/slim-postdata-merge

-- 
Regards,
Mike


Attachment: [application/json] logs.json

Thread (6 messages)

« previous php.internals (#68625) next »