New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalizers should be cacheable with CacheableSupportsMethodInterface #51

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
4 participants
@bastnic
Copy link

bastnic commented Dec 8, 2018

With Symfony 4.1, a new interface CacheableSupportsMethodInterface was given to explicitly say that:

Marker interface for normalizers and denormalizers that use only the type and the format in their supports*() methods.
By implementing this interface, the return value of the supports*() methods will be cached by type and format

@see https://symfony.com/blog/new-in-symfony-4-1-faster-serializer

It seems that all the normalizers generated by Jane are eligible to this cache and given that on a serious project we have tenth of normalizers, we can get an important performance boost.

@pyrech

pyrech approved these changes Dec 8, 2018

@bastnic bastnic changed the title Normalizers shoube cacheable with CacheableSupportsMethodInterface Normalizers should be cacheable with CacheableSupportsMethodInterface Dec 8, 2018

@coveralls

This comment has been minimized.

Copy link

coveralls commented Dec 8, 2018

Pull Request Test Coverage Report for Build 234

  • 7 of 7 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 85.163%

Totals Coverage Status
Change from base Build 231: 0.03%
Covered Lines: 2893
Relevant Lines: 3397

💛 - Coveralls

@bastnic bastnic force-pushed the bastnic:feature/generate-cacheableSupportsMethodInterface-normalizers branch from 0227d0b to 0f59e57 Dec 8, 2018

@bastnic bastnic force-pushed the bastnic:feature/generate-cacheableSupportsMethodInterface-normalizers branch from 0f59e57 to 3cc4064 Dec 8, 2018

@bastnic

This comment has been minimized.

Copy link

bastnic commented Dec 8, 2018

the failing test is from master, not new with this branch.

@joelwurtz

This comment has been minimized.

Copy link
Member

joelwurtz commented Dec 10, 2018

To rebase on 4.x

@bastnic bastnic closed this Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment