DamienHarper/auditor-bundle

Performance issues in Symfony 6.4

kopfsalat opened this issue · 0 comments

Q A
auditor-bundle version 5.4
PHP version 8.2
Database MySQL 8

Summary

Hi,

after upgrading from Symfony 5.4 to 6.4, we noticed a performance impact on our integration tests when the auditor-bundle is enabled. This issue only affects tests that flush data. We were able to identify the root cause as the handling of events (dispatchEvent()) in Symfony\Bridge\Doctrine\ContainerAwareEventManager.

Disabling the auditor-bundle via config (just enabled: false) restored the tests to their usual performance.

The performance difference is significant, with each test taking approximately 9 seconds when auditor-bundle is enabled and less than 1 second when disabled.

However, this difference only seems to be present in our development environment. We have not observed these issues in our staging environment or in our test step in the ci/cd pipeline. I disabled xdebug to see if this could be related, but unfortunately it isn't. I'm running out of time to debug this further and it's perfectly fine to have the auditor bundle disabled in dev for now.

Let me know if this report is of interest and if you have specific questions. I can then spend some more time on it.

Current behavior

In our dev environment with Symfony 6.4, integration test performance has significantly decreased by a factor of 9 compared to when we were using Symfony 5.4.

How to reproduce

Currently, I am unable to provide all the details regarding our development infrastructure, and I am uncertain about the root cause of this issue. However, as previously stated, I can conduct further investigation if necessary.

Expected behavior

Almost no performance change, I guess :-)