Jump to content

FileCompiler - when is it compiling?


pleini
 Share

Recommended Posts

Hello Guys,

i have a question regarding the fileCompiler of PW 3.x. On my page i am monitoring the execution times and sometimes i have some peaks in the execution time. I profiled the code and i recognized that those peaks come from the fileCompiler, more specific from the function compileNamespace (preg_match_all takes the most time).

So my question is, how does the FileCompiler decides when it compiles the files, and would it be possible that i trigger the compilation of all files after a new deployment so that during requests of visitors of my page there are no compilations, to keep the loading times as low as possible?

 

thank you

Joscha

Link to comment
Share on other sites

The FileCompiler only compiles files if there has been a change to a file since it's last compilation. So once you deploy, if you don't change any template files. or update any modules, the file compiler doesn't do anything. If you then make a change, it will compile the one time (likely when you view your changes) and that is it, so the users will probably never have to wait for it to compile.

That said, the only time I ever notice the file compiler is during an upgrade of a site from 2.x to 3.x when it has to compile all template and module files at once. I have never noticed the time for compiling one file. If you are seeing peaks from the file compiler on every page load, maybe there is something amiss?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...