frankenphp icon indicating copy to clipboard operation
frankenphp copied to clipboard

perf: move sandboxed environment to the C side

Open AlliBalliBaba opened this issue 1 month ago • 0 comments

This PR uses zend_array_dup to simplify the environment sandboxing logic. It removes the CGO overhead from $_ENV and $_SERVER registration in regular threads and saves some memory on many threads. (wip)

Quick Benchmark Main This PR
BenchmarkHelloWorld-20 7071 7482
BenchmarkEcho-20 12160 12098
BenchmarkServerSuperGlobal-20 5550 5829
BenchmarkUncommonHeaders-20 6444 6709

AlliBalliBaba avatar Dec 02 '25 23:12 AlliBalliBaba