Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: avoid redundant work in frankenphp_release_temporary_streams()
Persistent streams are of type le_pstream, not le_stream. Therefore, the persistent check will always be false. We can thus replace that check with an assertion. `zend_list_delete` removes the entry from the regular_list table, and calls `zend_resource_dtor` via the table destructor. When the refcount is 1, `zend_list_close` calls `zend_resource_dtor`, but keeps the entry in the table. Multiple calls to `zend_resource_dtor` have no effect: the destructor is only called once. Therefore, the `zend_list_close` operation is redundant because it is fully included in the work done by `zend_list_delete`.
- Loading branch information