jtingato Posted April 23, 2009 Share Posted April 23, 2009 We have a PHP site using Joomla CMS on a Windows IIS Server. The site is fast during use, but after a period of time, the first attempt to connect to the site is very slow. I contacted my hosting provider and was informed that the website needs to be compiled on a regular basis, so when the first attempt is made, the site is compiled first then it runs well. I thought php was an interpreted code. Does it need to be compiled? Can someone explain this to me? Is this because it is running on IIS? Also if PHP is compiled on the server, what happens when I make a change to a file? Does it have to compile again immediately prior to running? We make changes all the time, as we are still in development. After each change the site still runs fast. It is only after a period of time that the site seems to 'go to sleep' Can someone please help me to understand this process? Thank you John Link to comment https://forums.phpfreaks.com/topic/155288-does-a-php-site-need-to-be-compliled-daily-on-its-server/ Share on other sites More sharing options...
radi8 Posted April 23, 2009 Share Posted April 23, 2009 We run a lot of PHP pages at our office and have never had to recompile anything. I also manage a Joomla site and to the best of my knowledge, that site has never needed compiled either and it works fine, albeit on a nix server. Unless I am missing something, I think that they are blowing smoke up your @ss. Find another host site or get a nix server. Link to comment https://forums.phpfreaks.com/topic/155288-does-a-php-site-need-to-be-compliled-daily-on-its-server/#findComment-817026 Share on other sites More sharing options...
PFMaBiSmAd Posted April 23, 2009 Share Posted April 23, 2009 Php is a parsed, tokenized, interpreted language. It it is not "complied" and in fact the parse phase for a typical site would be under a few 100 ms. You can cache the tokenized version of a page, saving the time it takes to parse and tokenize the code. This is usually referred to as a php "bytecode" cache. However this would only save/add a relatively small amount of time if this feature is present and your files are in/not in the bytecode cache and need to be parsed and tokenized again. It is more likely that the delay you are seeing is due to the time needed to read the numerous .php files that make up a page in an application like Joomla from the physical disk instead of out of the disk cache. Recently accessed files are held in a disk cache in memory to improve performance. If the files have not been accessed for a time, they are purged from the cache. You are at the mercy of your web host and the operating system as to how long files are held in the disk cache and how efficient disk reads are when your files are not in the cache. Link to comment https://forums.phpfreaks.com/topic/155288-does-a-php-site-need-to-be-compliled-daily-on-its-server/#findComment-817063 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.