-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
[Cache] optimize Pimcore cache with doctrine entities #1843
Conversation
You mean: related to #1841 |
obviously :D |
@jdreesen what do you think of the solution? actually that should be somehting pimcore does, but they need to refactor serialization in general and this is something we cannot wait for. |
src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/PimcoreCachePass.php
Outdated
Show resolved
Hide resolved
src/CoreShop/Bundle/ResourceBundle/Pimcore/CacheResourceMarshaller.php
Outdated
Show resolved
Hide resolved
…r/PimcoreCachePass.php Co-authored-by: Jacob Dreesen <[email protected]>
…ller.php Co-authored-by: Jacob Dreesen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think of the solution?
I'm not really experienced in Pimcore's/Symfony's cache implementation, but at first glance it looks good to me.
actually that should be somehting pimcore does, but they need to refactor serialization in general
💯 👍
Can this solution be adjusted to make it compatible with Pimcore 6.9 / Coreshop 2.2? |
@BlackbitNeueMedien not sure really... Pimcore 6.9 still uses it's own cache implementation and I don't think that there are extensions points in there. |
Still struggling with performance issues when creating version entries. In Blackfire I see that DeepCopy does a lot of things with Doctrine collections (to be read from bottom up):
Is it correct that for example in CoreShop/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductSpecificPriceRules.php Lines 202 to 218 in bb08732
productSpecificPriceRules ?
Actually I have the impression that the jms serializer config files do not get loaded at all as I see thousands of requests for Country.stores, Country.translations, Country.states in |
@BlackbitNeueMedien you get this issues with 2.2 right? |
@dpfaffenbauer Yes. This time it is about versioning (this PR was originally about caching). Performance problems when creating cache entry I have now solved by replacing CoreShop/src/CoreShop/Bundle/ResourceBundle/EventListener/DeepCopySubscriber.php Lines 43 to 46 in bb08732
$copier->addFilter(new SetNullFilter(), new PropertyTypeMatcher(Collection::class)); Do not know if this works but at least the site is usable at all with this... To be clear, I do not speak about problems that it needs 1 second or something similar to save an object but it now takes 30 seconds. As soon as I disable versioning, it gets saved in 0.3s. There are ca. 100 items in |
Marshalling Data for Caching works similar as for Versioning. Both is not done wright. But it is how it is... You can try doing the same for Versioning. But: Reverting Versions might result in unexpected behaviour.... |
Related to #1841