Re: [PHP-DEV] Session mm support

2020-08-26 Thread Stanislav Malyshev
Hi! > I've recently found out that compiling PHP with --with-mm has a massive > negative impact on PHP startup performance (approximately 3-4 times > slower), to the point that our CI got approximately 2x slower overall with > it enabled. This is not great. That's weird. Would be nice to run a

Re: [PHP-DEV] PDO fetch performance problems with many bind parameters

2020-08-26 Thread Dino Pejakovic
Just that you are aware the emails from both of you went to my spam folder. Thanks for the info. If anyone has any idea why we went to spam, please let us know. The reason I didn't create a pull request immediately is that I don't have a concrete fix. The diff that I sent just shows where I

Re: [PHP-DEV] PDO fetch performance problems with many bind parameters

2020-08-26 Thread Matteo Beccati
Hi Dino, On 26/08/2020 15:02, Dino Pejaković wrote: > [snip] > ||+   // if (!dispatch_param_event(stmt, PDO_PARAM_EVT_FETCH_POST)) {|| > ||+   //  return 0;|| > ||+   // }|| > || || > ||    if (do_bind && stmt->bound_columns) {|| > ||    /* update those bound

Re: [PHP-DEV] PDO fetch performance problems with many bind parameters

2020-08-26 Thread G. P. B.
Just that you are aware the emails from both of you went to my spam folder. Back to the matter, this is the correct list to email Dino, however could you open a pull request on GitHub for this change so that more eyes (and especially eyes from people which know PDO) can have a look? Please

[PHP-DEV] PDO fetch performance problems with many bind parameters

2020-08-26 Thread Dino Pejaković
Hi, First time messing around with PHP internal code and mailing lists, so sorry if I'm in the wrong place or doing something wrong in general. I recently noticed some weird performance issues while doing bulk inserts with prepared statements (single INSERT with a lot of VALUES) and using

Re: [PHP-DEV] Session mm support

2020-08-26 Thread Matteo Beccati
Hi Nikita, On 26/08/2020 09:37, Nikita Popov wrote: > Hi internals, > > I've recently found out that compiling PHP with --with-mm has a massive > negative impact on PHP startup performance (approximately 3-4 times > slower), to the point that our CI got approximately 2x slower overall with > it

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Ivan Zanev
Thank you! On Wed, Aug 26, 2020 at 11:00 AM Alex wrote: > Dear Ivan, > > Some suggestions: > > - Build your own copy of the PHP embed library using ./configure > --enable-embed=shared or ./configure --enable-embed=static. Link against > that. > - If it doesn't work, get some already-working

Re: [PHP-DEV] Array map with reset function

2020-08-26 Thread Rowan Tommins
On Tue, 25 Aug 2020 at 20:08, Nikita Popov wrote: > On Tue, Aug 25, 2020 at 7:47 PM Michael Voříšek - ČVUT FEL < > voris...@fel.cvut.cz> wrote: > > > The following code stopped working in PHP 8: > > > > https://3v4l.org/UlIE3 To be pedantic: it didn't stop working, it just started raising

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Alex
Dear Ivan, Some suggestions: - Build your own copy of the PHP embed library using ./configure --enable-embed=shared or ./configure --enable-embed=static. Link against that. - If it doesn't work, get some already-working sample code for use of the PHP embed SAPI and modify it rather than starting

Re: [PHP-DEV] Session mm support

2020-08-26 Thread Alex
I guess the first question is: Why is it so slow? I don't think that using shared memory to store data is inherently slower than storing it anywhere else. It might be that spending an hour or two profiling and optimizing could slash this time right down. On Wed, Aug 26, 2020 at 9:37 AM Nikita

[PHP-DEV] Session mm support

2020-08-26 Thread Nikita Popov
Hi internals, I've recently found out that compiling PHP with --with-mm has a massive negative impact on PHP startup performance (approximately 3-4 times slower), to the point that our CI got approximately 2x slower overall with it enabled. This is not great. As I only found out about the

Re: [PHP-DEV] Segmentation Fault when trying to call zend_new_array.

2020-08-26 Thread Ivan Zanev
Yes, it does. I recompiled php now with --configure --enable-embed=static and wrote a simple script: #include #include #include "sapi/embed/php_embed.h" int main(int argc, char *argv[]) { php_embed_init(argc, argv); HashTable *ht = zend_new_array(15); return 0; }