I'm working on a Symfony 2 project running on a shared hosting (cheap but slow, I've to admit). Performances are really bad, even minifying all css/js and enabling the gzip compression (PHP output only with a custom php.ini). Server responds in 5-10 seconds, that is the time to parse and execute PHP files. Dowloading resources takes just millisecs, hence the delay is between the request and response. This is what (I think) I've found with the Chrome network console.
Looking at the annotation reader cache folder (app/cache/prod/annotations
) I've noticed that and there are 441 *.cache.php files in it. I think that the annotations reader is going to read all of these files on each request!
This could be the source of the bad performances. How can I speed up things and write a custom annotation cache driver that uses just less files or a single file as annotations cache?