staabm / phpstan-dba

PHPStan based SQL static analysis and type inference for the database access layer
https://staabm.github.io/archive.html#phpstan-dba
MIT License
250 stars 17 forks source link

Reduce use of PreviousConnectingVisitor::ATTRIBUTE_PREVIOUS to assist garbage collector #671

Open staabm opened 1 month ago

staabm commented 1 month ago

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