Script Execution Time

liunx

Guest
Hi,<br />I am coding an internet browser game which is getting pretty big (code-wise). I just tried running the battle script for the game and added a timer for the execution time.<br />The battle PHP script takes about 0.5 to 1.0 seconds to execute while the other pages take 0.1 or less.<br />I am on a shared server (server 64) and wonder if scripts that take more than 1 second to execute will slow down the other websites on that server.<br /><br />Also, does the server run several PHP scripts at once, or does it run one script at a time?<!--content-->
Hi.<br /><br />The server is capable of running multiple scripts at once.<br /><br />As for the server load, a script that takes 1 second to execute is not much by itself, unless your game will be played by a lot (hundreds or thousands) of visitors.<br /><br />I'd say to give it a try and carefully monitor the server load while your game gets more players. This is not the best option, though, since a shared server (Assuming you're on a shared server) is used by more people and the loads could get higher if someone else is also using resource intensive web applications.<br /><br />If possible, implement a maximum number of players (perhaps based on what you see from the server loads while people are playing).<!--content-->
 
Back
Top