Skip to content
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

Performance Issues v1.x #70

Open
Fantus opened this issue Nov 14, 2020 · 2 comments
Open

Performance Issues v1.x #70

Fantus opened this issue Nov 14, 2020 · 2 comments

Comments

@Fantus
Copy link

Fantus commented Nov 14, 2020

During some testing i run into performance issues, regarding the version 1.x of this bundle (dont know about v2 yet).

What? version
Sylius 1.8
SyliusThemeBundle 1.5.1

Test was done via siege and without any theme installed/configured (plain demo data) and in prod!
siege http://127.0.0.1:8081/en_US/ -b -c 20 -t5m --no-parser -v

Theme bundle active Yes No
Transactions: 3496 5220 hits
Availability: 100 100 %
Elapsed time: 299.2 299.61 secs
Data transferred: 63.23 94.41 MB
Response time: 1.71 1.15 secs
Transaction rate: 11.68 17.42 trans/sec
Throughput: 0.21 0.32 MB/sec
Concurrency: 19.94 19.96
Successful transactions: 3496 5220
Failed transactions: 0 0
Longest transaction: 4.99 3.36
Shortest transaction: 0.28 0.17

X Debug Profiles

Theme bundle active Yes No
Function calls 79 293 72 149

Possible Issue:
From my research from one of the main issues is Sylius\Bundle\ThemeBundle\Twig\ThemeFilesystemLoader is used even if no theme is registered. This results in Sylius\Bundle\ThemeBundle\Twig\ThemeFilesystemLoader::getCacheKey and the other methods to always throw an exception and then falls back to the default TwigLoader and bypass the cache.
In dev mode its even worse as the lookup is done again during Symfony\Bridge\Twig\DataCollector\TwigDataCollector::lateCollect and again fails to hit the first level cache

I attached the corresponding xdebug profiles
cachegrind.out.zip

@Roshyo
Copy link

Roshyo commented Mar 21, 2022

@Fantus is that still an issue ?

@Fantus
Copy link
Author

Fantus commented Mar 21, 2022

@Roshyo i think so. If i remember correctly i created this pull requests #71 back then. It should fix the issue, but quiet some time has passed since then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants