DarkHavoc Posted November 5, 2003 Posted November 5, 2003 http://server43.totalchoicehosting.com/~te...n/ministats.cgi i finally made those live game ratings that i was asking for but i must admit its a bit slow to load. But since i only know perl and not something else it will have to stay like this. can someone help me optimize my code so it loads faster.. the main program is.. that its basically looking up 1 website for each member of the game. and divides the details with an array. the code that is laggy the most is the get function. -- print header(); foreach $i (@list){ @doc = split(/ /,get("http://207.46.203.186/AOM_XPACK/query/query.aspx?")); @temp = split(/=/,$doc[119]); $temp[1]=~ s/\D//g; --- see the get? hehe anyone know faster command then this one i used Quote
TCH-Sales Posted December 5, 2003 Posted December 5, 2003 Hmm not sure how much further you could optimize it after looking at that code. Hope you find a solution though! Quote
Deverill Posted December 5, 2003 Posted December 5, 2003 One experiment that may be worth trying would be to download everything in a tight loop to a local array and THEN parse the array with your splits. Often in programming the Get a line Process it Get another approach has a lot of overhead whereas getting the whole thing and then processing the whole thing reduces that overhead making it faster. Quote
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.