phpstan-dba
phpstan-dba copied to clipboard
Reduce use of PreviousConnectingVisitor::ATTRIBUTE_PREVIOUS to assist garbage collector
idea is to have less Ast\Nodes with a pointer to the previous node, so the garbage collector has a easier job identifying unused nodes and clear memory. for our use-case its enough to know parents within functions/method bodies.
refs https://github.com/staabm/phpstan-dba/issues/667
in the long run it would be best to get rid of PreviousConnectingVisitor but I am currently not deep enough into the details of this lib todo such refactoring right now