Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Deprecations causing big performance hit in dev ProfilerListener #24625

Closed
@linaori

Description

@linaori
Q A
Bug report? no
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.4.x

When you trigger a lot of deprecations, they will be stored in the profiler. However, this causes a massive performance hit on all dev pages triggering those. from 5 to 89 deprecations, causes the profiler listener to go from roughly 300 to 900ms.

For 3.4, this deprecation is causing most issues:

@trigger_error(sprintf('Requesting the "%s" private service is deprecated since Symfony 3.2 and won\'t be supported anymore in Symfony 4.0.', $id), E_USER_DEPRECATED);

Pre deprecation
image

Post deprecation
image

The cause seems to be the amount of unserialize function calls in the Stub. Stub::unserialize() goes from 4870 to 23570.

Pre deprecation
image

Post deprecation
image

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions