It is currently Tue Sep 26, 2017 11:09 am Advanced search

Java, lots of timeouts on the game server.

New Language? Want more libraries? Post Here.

Java, lots of timeouts on the game server.

Postby StF00 » Sun Nov 20, 2011 3:30 pm

Hi,

I'm seeing a lots of timeouts with my bot on the game servers.
When running locally, or on TCP servers, with similar maps, all the turns seems to be completed in <30ms.
I don't think my hardware is that superior, this is a 4+ years old xeon.

I can only think of the GC, to randomly add hundreds of ms to a turn, and threw me over the wall.
I've looked at the compile.py file ;
what is the value collected by this line, on a game server ?
MEMORY_LIMIT = server_info.get('memory_limit', 500)

Fellow Java programmers, do you have any advice ?
Is the only trick to keep the code/structures small enough, so that there will not be a need to GC before the end of the game ?
Or do you insert 'void' turns ; where the only activity is a GC ?

Thx
StF00
Cadet
 
Posts: 4
Joined: Thu Oct 27, 2011 12:04 pm

Re: Java, lots of timeouts on the game server.

Postby Janzert » Mon Nov 21, 2011 3:36 am

1500, and is also the default in recent versions of compile.py.
Janzert
Contest Organizer
 
Posts: 271
Joined: Sun Feb 07, 2010 1:59 am

Re: Java, lots of timeouts on the game server.

Postby dimkadimon » Mon Nov 21, 2011 4:55 am

My best advice is not to use the Scanner class that comes with the Java starter package - it is slow. Instead use the one described by kuisma here: viewtopic.php?p=10462#p10464
dimkadimon
Major-General
 
Posts: 263
Joined: Wed Oct 06, 2010 11:34 pm
Location: Adelaide, Australia


Return to Language Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron