Jump to content

do I use $split to split my common.php into several smaller files?


Iank1968

Recommended Posts

I have a common.php file thats 4000 lines long and it boggs the server down big time. Can I use the $split function to break up the file and put less of a strain on the server when people play my game?

 

I wasnt sure if I could post this here seeing its a VB function. I would appreciate any help on how to get this mamoth file into bite size pieces and still work.

 

Thanks

Link to comment
Share on other sites

The size of the file (as in filesize or number of lines) has no affect on server load. However its the efficiently of the code that will have an affect.

 

What do you have going on in common.php? Maybe there is something in there which is causing unnecessary load on the server.

Link to comment
Share on other sites

php tidy will not help.

 

Chances are you code has loops that are not necessary etc. Stuff that can be condensed down and made to work more efficiently.

 

The size, as stated by wild, does not effect how fast the script runs. It is all about how it is coded.

Link to comment
Share on other sites

ahh ok, I have 4000 lines to go threw and see where I messed up lol. the common.php file is for a game. you click an object in hopes to win a prize thats a rare. there are several common, and semi rares and 1 rare. There are 5 catagories and about 50 prizes, so I have alooooot to go threw, and not really sure what to look for.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.