We have nearly 70 entities, and when profiling, we detected that reflection/doc-block is very costly (nearly 20 seconds, see screenshot below).
Apparently it is only used to read entity summary (so I removed it in my case).
I think the PhpDocResourceMetadataFactory file may need a cache.

It is cached (PropertyInfo takes care of this). There is something weird with your setup.
Are you in prod mode?
OK my bad, I saw that while profiling behat, so in test mode.
Le lun. 28 mai 2018 à 16:53, Kévin Dunglas notifications@github.com a
écrit :
Are you in prod mode?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/api-platform/core/issues/1981#issuecomment-392547490,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABVWxTQ_PeYQKlcf_rCJfyez5u_ZPWp7ks5t3A91gaJpZM4UQSP3
.
Be sure to use:
parameters:
api_platform.metadata_cache: true
in your Behat test app.
See #1725. It was also backported to 2.2.
We need to add this in the Flex recipe btw.
@teohhanhui I was for the record ;)
And the cache is still not used?
Nope, as it's not an api-platform cache IIRC
Most helpful comment
OK my bad, I saw that while profiling behat, so in test mode.
Le lun. 28 mai 2018 à 16:53, Kévin Dunglas notifications@github.com a
écrit :