A Symfony bundle for automatic performance optimization.
- Analyze database queries.
- Check cache configuration.
- Display performance metrics in the profiler.
-
Add the bundle to your project:
composer require hch/performance-optimizer-bundle
-
Enable the bundle in your
config/bundles.php
file:return [ // ... HCH\PerformanceOptimizerBundle\PerformanceOptimizerBundle::class => ['all' => true], ];
-
Run the optimization command:
php bin/console performance:optimize
-
Usage Options:
You can specify options to run specific optimizations:
--cache
: Optimize cache performance.--config
: Check configuration files.--assets
: Optimize assets.--images
: Optimize images.--queries
: Check for N+1 queries.Example:
``` php bin/console performance:optimize --cache --assets ```
-
Contributing:
Contributions are welcome! If you'd like to contribute to the PerformanceOptimizerBundle, please follow these steps:
1- Fork the repository.
2- Create a feature branch (git checkout -b feature/YourFeature).
3- Make your changes and commit them (git commit -m 'Add some feature').
4- Push to the branch (git push origin feature/YourFeature).
5- Create a pull request.
This bundle is released under the MIT License.