Skip to content

Improve caching speeds by using "cache.system" #18

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

Closed
wants to merge 1 commit into from

Conversation

Kocal
Copy link
Contributor

@Kocal Kocal commented Jun 14, 2025

Blackfire profiles are based on the reproducer from symfony/ux#2812, with 50 rows, APP_DEBUG=0 APP_ENV=prod and optimized Composer files


Actually, after many refreshes and TailwindMerger's cache warm-up: https://blackfire.io/profiles/41d1047c-e33d-4849-9c89-f87447875886/graph
image

With this PR, 1st request when the TailwindMerger's cache is still cold, we don't see real changes: https://blackfire.io/profiles/bd954d82-ced6-4fd7-a308-11a830d56ca5/graph
image

With this PR, next requests, when TailwindMerger's cache is warmed-up: https://blackfire.io/profiles/34e06af9-cf57-46b6-8615-584739de364c/graph
image

Delta: https://blackfire.io/profiles/compare/383c6e05-0afd-484e-a680-e06ff080383c/graph
image


It works because cache.system uses https://symfony.com/doc/current/components/cache/adapters/php_files_adapter.html which is more performant than https://symfony.com/doc/current/components/cache/adapters/filesystem_adapter.html.

However, I'm not sure if that's the recommended way to do so, or if we should create the PhpArrayAdapter service ourselves.

@Kocal
Copy link
Contributor Author

Kocal commented Jun 14, 2025

Hum, given symfony/symfony-docs#15827 (comment), it looks like using cache.system is not a good idea for our case. :/

@Kocal Kocal closed this Jun 15, 2025
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

Successfully merging this pull request may close these issues.

1 participant