Macintrash Posted July 26, 2010 Share Posted July 26, 2010 I notice some mccode games load so fast you dont see the page move. Others, you click a link and it turns black and re-renders everything. What can be done to increase loading speed? I heard echo/print can make a difference. I also heard the use of <div> would help. Anyone know any good specifics that dont need a complete engine conversion just to implement? Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 26, 2010 Share Posted July 26, 2010 Well, code php HTML, CSS, JS all to the lastest standards, make sure its all valid etc. Dont overcrowd your site with images, mabey 1 or 2 a page (excluding the header) Dont use a free host there as slow as a turtle Quote Link to comment Share on other sites More sharing options...
Haunted Dawg Posted July 26, 2010 Share Posted July 26, 2010 For faster loading time's, you got to think about server side, now what is serverside? PHP, that is the background of the engine. To speed this up, you'll need to update your script, modify and even delete some thing's. A lot of mccode's game's when they get like over 1k member's daily then it start's loading like a pig :P a full recode should help you fix your problem :) Quote Link to comment Share on other sites More sharing options...
Dominion Posted July 26, 2010 Share Posted July 26, 2010 for loading time a lot can be done things like query's can ve updated using least can cut down on how many times you need to run querys things such as echo over print and using mysql_query over $db->query (if your using v2) adds a micro of a sec however not noticed on the user end in my opinion anyway. just keep pages small and everything optimized and you will be fine you can also use javascript so pages do not need to reload everytime someone clicks a submit (e.g usernotpad) works wounders on the feel of a website to the user Quote Link to comment Share on other sites More sharing options...
Zeggy Posted July 26, 2010 Share Posted July 26, 2010 There are many places where improvements can be made: PHP code Database queries Database schema Server specs (cpu, ram, etc) Server network speed To get the best improvement in speed, you'll need to do some testing to see which area is slowest. Quote Link to comment Share on other sites More sharing options...
NarutoPRG.com Posted July 26, 2010 Share Posted July 26, 2010 Try and keep your PHP lines in your code to a minimum you can. Some people use of 100+ more lines for a useronline.php, witch will slow it down, for a simple file. Quote Link to comment Share on other sites More sharing options...
Macintrash Posted July 26, 2010 Author Share Posted July 26, 2010 Im going to be hiring someone real soon to fix this all. Im looking for someone who can do awesome graphic layouts to improve the standard MC tabled login page, improve tables, horizontal rules, css, fonts etc. I want it to look better and load quicker at the same time. I want someone i can trust. So with that being said, is scriptlance a good place to do this? As an owner with decent donations coming in i could probably afford $100 worth of updates at a time. Should i stick with MWG or should i use something like scriptlance and use someone who's never even heard of MCCode? Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 26, 2010 Share Posted July 26, 2010 You should probabbly use someone thats heard of mcc. :) Quote Link to comment Share on other sites More sharing options...
Paddy Posted July 26, 2010 Share Posted July 26, 2010 if you read this 5 times and actually learn something i bet you could do it on your own without hiring anyone Make your site faster step by step :P i wouldn't mind helping you if you find something on there you don't understand :) this is a start that im 100% sure if done well you can get a much better loading time, but there is more to be done to be a grade A on mcc Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted July 26, 2010 Share Posted July 26, 2010 nitpick through your site. yslow Firefox addon and then see how badly your doing. .htaccess setting ExpiresByType and SetOutputFilter GZIP is something is often overlooked and will significantly improve your site speed. Decent hosting. Sorry but all of the unlimited everything is BS hosting. No such thing as unlimited bandwidth or disk space and its more than likely that the server is over sold. http://www.rulerofzu.com is on a dedicated server - Intel i7-920 quad core, 12gb ddr3 ram and raid 1 2 x 1500GB drives. With secure passive ftp backup Quote Link to comment Share on other sites More sharing options...
mxyi Posted July 26, 2010 Share Posted July 26, 2010 if u want to make it run faster simply change things like print to echo and if ur using V2 change mysql_query to $db->query :) it will improve the time to load the page by a bit, theres a modification that u can put onto your game that allowes you to see he exact time it takes to load it (even miliseconds ;D) i cant remember were i saw this modification but im sure the search engine will help that way u can expiriment changing the code to see if it loads faster or slower :) Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted July 26, 2010 Share Posted July 26, 2010 mxyi v2 is $db->query :whistling: Quote Link to comment Share on other sites More sharing options...
Paddy Posted July 26, 2010 Share Posted July 26, 2010 rulerofzu you read my post ? we said the same thing, only i posted the link :P and yes that link i got it from using yslow & firebug which helped me alot :) Quote Link to comment Share on other sites More sharing options...
NarutoPRG.com Posted July 26, 2010 Share Posted July 26, 2010 [mysql]$db->query("SELECT * FROM `users`"); = V2 mysql_query("SELECT * FROM `users`"); = V1 & V2[/mysql] $db-> Is more secure then mysql alone. Either way your query can be used through $db-> or mysql in V2. Quote Link to comment Share on other sites More sharing options...
Dominion Posted July 26, 2010 Share Posted July 26, 2010 how is $db->query more secure then mysql_query ? all $db->query does is mysql_query($query,$c) or die(mysql_error()); via the class folder, it is faster to use mysql_query() since you are not calling a whole new file however in v2 its nothing since the database class is always called anyway Quote Link to comment Share on other sites More sharing options...
rulerofzu Posted July 26, 2010 Share Posted July 26, 2010 I didnt click on your link until after I had posted paddy but yeah it covers most of the same stuff. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 26, 2010 Share Posted July 26, 2010 Don't use sprintf either. Quote Link to comment Share on other sites More sharing options...
Djkanna Posted July 26, 2010 Share Posted July 26, 2010 Gzip has been mentioned but something to look at. Optimize your images, CSS, Javascript. Look for a few articles on optimizing your Website. I'll start you off, (it's even a video) http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-improve-your-sites-performance-in-3-easy-steps/ Quote Link to comment Share on other sites More sharing options...
Equinox Posted July 26, 2010 Share Posted July 26, 2010 [mysql]$db->query("SELECT * FROM `users`"); = V2 mysql_query("SELECT * FROM `users`"); = V1 & V2[/mysql] $db-> Is more secure then mysql alone. Either way your query can be used through $db-> or mysql in V2. Did someone tell you that or was it a stab in the dark? Plus, you've got bigger problems here: You're selecting all the data from the table 'users', and with the size of that users table in V2 it's not really advised, the difference won't be that noticeable in a small game environment but it's still not advised. And, a way to improve speed is to use your database to it's full potential - don't cram a bunch of crap into one table, for example 'users'. I've seen people putting ALL their crimes into the users table and recording what crimes the user has completed by updating it to the users table. And it gets worse in the fact when they want to display the total amount of crimes accomplished, they done something like: $Select = mysql_query("SELECT * FROM `users`); $User = mysql_fetch_array($Select); $Total = $User['Crime1'] + $User['Crime2'] + $User['Crime3'] + $User['Crime4'] + $User['Crime5'] + $User['Crime6']; echo $total; It's shocking, that could easily be accomplished by recording the data into a separate database table. There are a lot of aspects of a site that you can alter to improve your site speed. Djkanna posted a very good way of doing things, with the video. I actually bookmarked links from that site as I'd never heard of them so thanks Djk ;) You will hear so many different ways on how you can go about this, but at the end of the day, for me it comes down to preference. I have my own preference like everyone else and I believe that my way is efficient enough, just like so many others. Quote Link to comment Share on other sites More sharing options...
Danny696 Posted July 27, 2010 Share Posted July 27, 2010 Error in your post ;) Quote Link to comment Share on other sites More sharing options...
Equinox Posted July 27, 2010 Share Posted July 27, 2010 Urgh, it was late.... Nevermind xD Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.