Re: [PHP-DEV] tsrm question

2024-07-24 Thread Pierre Joye
On Wed, Jul 24, 2024 at 7:06 PM Rob Landers wrote: > > On Wed, Jul 24, 2024, at 13:54, Pierre Joye wrote: > > Hi Rob, > > > On Wed, Jul 24, 2024 at 3:17 PM Rob Landers wrote: > > > > Hello internals, > > > > Last night I went down a rabbit hole with Frankenphp: > > https://github.com/dunglas/fra

Re: [PHP-DEV] tsrm question

2024-07-24 Thread Pierre Joye
On Wed, Jul 24, 2024, 7:06 PM Rob Landers wrote: > > The number of threads are static (at least for now), so we should def do > this. > > Long story short, the TSRM API is very flexible, how and when you > alloc/free rsrc is basically up to you. It is possible to keep some > around in the root th

Re: [PHP-DEV] tsrm question

2024-07-24 Thread Rob Landers
On Wed, Jul 24, 2024, at 13:54, Pierre Joye wrote: > Hi Rob, > > > On Wed, Jul 24, 2024 at 3:17 PM Rob Landers wrote: > > > > Hello internals, > > > > Last night I went down a rabbit hole with Frankenphp: > > https://github.com/dunglas/frankenphp/pull/933 > > > > It isn't 100% clear to me what

Re: [PHP-DEV] tsrm question

2024-07-24 Thread Pierre Joye
Hi Rob, On Wed, Jul 24, 2024 at 3:17 PM Rob Landers wrote: > > Hello internals, > > Last night I went down a rabbit hole with Frankenphp: > https://github.com/dunglas/frankenphp/pull/933 > > It isn't 100% clear to me what values `ts_resource(id)` holds and if it needs > to be freed/allocated p

Re: [PHP-DEV] tsrm question

2024-07-24 Thread Peter Stalman
On Wed, Jul 24, 2024 at 1:15 AM Rob Landers wrote: > Hello internals, > > Last night I went down a rabbit hole with Frankenphp: > https://github.com/dunglas/frankenphp/pull/933 > > It isn't 100% clear to me what values `ts_resource(id)` holds and if it > needs to be freed/allocated per request or

[PHP-DEV] tsrm question

2024-07-24 Thread Rob Landers
Hello internals, Last night I went down a rabbit hole with Frankenphp: https://github.com/dunglas/frankenphp/pull/933 It isn't 100% clear to me what values `ts_resource(id)` holds and if it needs to be freed/allocated per request or per thread. The performance impact is huge to reallocate on e