From: Carsten W. <ca...@us...> - 2007-05-14 23:37:13
|
Update of /cvsroot/jake2/jake2/src/jake2/server In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4884/src/jake2/server Modified Files: SV_ENTS.java Log Message: this was the biggest garbage producer (32KB each frame), now fixed Index: SV_ENTS.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/server/SV_ENTS.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** SV_ENTS.java 27 Dec 2005 21:02:30 -0000 1.7 --- SV_ENTS.java 14 May 2007 23:37:00 -0000 1.8 *************** *** 535,538 **** --- 535,542 ---- } + + // stack variable + private static byte buf_data[] = new byte[32768]; + /** * Save everything in the world out without deltas. Used for recording *************** *** 540,554 **** */ public static void SV_RecordDemoMessage() { - int e; - edict_t ent; - entity_state_t nostate = new entity_state_t(null); - sizebuf_t buf = new sizebuf_t(); - byte buf_data[] = new byte[32768]; - int len; - if (SV_INIT.svs.demofile == null) return; //memset (nostate, 0, sizeof(nostate)); SZ.Init(buf, buf_data, buf_data.length); --- 544,553 ---- */ public static void SV_RecordDemoMessage() { if (SV_INIT.svs.demofile == null) return; //memset (nostate, 0, sizeof(nostate)); + entity_state_t nostate = new entity_state_t(null); + sizebuf_t buf = new sizebuf_t(); SZ.Init(buf, buf_data, buf_data.length); *************** *** 559,564 **** MSG.WriteByte(buf, Defines.svc_packetentities); ! e = 1; ! ent = GameBase.g_edicts[e]; while (e < GameBase.num_edicts) { --- 558,563 ---- MSG.WriteByte(buf, Defines.svc_packetentities); ! int e = 1; ! edict_t ent = GameBase.g_edicts[e]; while (e < GameBase.num_edicts) { *************** *** 583,587 **** // now write the entire message to the file, prefixed by the length ! len = EndianHandler.swapInt(buf.cursize); try { --- 582,586 ---- // now write the entire message to the file, prefixed by the length ! int len = EndianHandler.swapInt(buf.cursize); try { |