- Issue created by @longwave
- π¬π§United Kingdom longwave UK
Unfortunately this doesn't help, it is just slower.
Locally a standard install on 11.x is [11.47 sec, 252.17 MB]
With this change it is [14.92 sec, 252.74 MB]
Leaving this code here in case it is useful elsewhere where we want to avoid using token_get_all().
- π¨π¦Canada Charlie ChX Negyesi πCanada
nikic/php-parser uses token_get_all or in php8 the newly introduced PhpToken but both of those call the Zend C function tokenize_common so that's pretty much the same. if the problem is in the Zend tokenizing system then changing the call chain to it won't help.
- π¬π§United Kingdom longwave UK
Yeah, I think this is a false positive, it's not
token_get_all()
that's the problem - rebuilding the container does leak memory somewhere, but this isn't it.