Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature #31452 [FrameworkBundle] Add cache configuration for Property…
…Info (alanpoulain) This PR was squashed before being merged into the 4.3 branch (closes #31452). Discussion ---------- [FrameworkBundle] Add cache configuration for PropertyInfo | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a The PropertyInfoExtractor was not cached by default but the class to do it was surprisingly here, unused. I've added the configuration to enable it by default when it's not the development environment. I haven't added the warmup part because there are too much arguments for the methods (class, property, context). It will be a big boost for the performance! For this code: ```php $book = $this->serializer->deserialize('{"id":3,"reviews":[{"id": 7, "body": "This book is fantastic!", "rating": 9, "letter": "A", "publicationDate": "2019"}],"isbn":"978-0-5533-9243-2","title":"Fool\'s Assassin","description":"A famous saga","author":"Robin Hobb","publicationDate":"2014"}', Book::class, 'json'); $this->serializer->serialize($book, 'json'); ``` We obtain this: ![image](https://user-images.githubusercontent.com/10920253/57487994-2874d000-72b2-11e9-92a2-28b14a038194.png) The Blackfire comparison is here: https://blackfire.io/profiles/compare/2c746d26-320a-4aab-80ef-7276c2e92b96/graph Commits ------- 17f6225 [FrameworkBundle] Add cache configuration for PropertyInfo
- Loading branch information
Showing
5 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters