Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4376) Slow Motion
Home

[Freeciv-Dev] Re: (PR#4376) Slow Motion

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4376) Slow Motion
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 11 Jun 2003 01:51:00 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Wed, Jun 11, 2003 at 01:11:28AM -0700, ChrisK@xxxxxxxx wrote:
> On Tue, Jun 10, 2003 at 11:15:29AM -0700, Raimar Falke wrote:
> > On Sat, Jun 07, 2003 at 07:47:10AM -0700, ChrisK@xxxxxxxx wrote:
> > > 
> > > CVS 06 JUN 2003 GTK 1.2
> > > 
> > > Unit movement has got slow. There is a delay especially at the point 
> > > where a
> > > unit enters or leaves a city. Even more with ships. Use GOTO to watch. 
> > > This
> > > makes playing painful on a 200MHz machine.
> > > 
> > > Maybe an interaction with the CMA?
> > 
> > Try the one-liner and see if you can gather some information.
> 
> I get lines like 
> 
> 2: cm_query_result(city='Nagasaki'(193))
> 2: cm_query_result: return
> 
> - for each city a unit *passes* on goto.
> - for each unit activated (not moved) in a city
> - for each city a unit on a transport belongs to when the transport *passes*
>   a city on goto
> 
> I think the cma should not be involved as long as the goto is processed,
> only after it is finished.

This is odd. All steps of all units at the turn-done time are merged
(turn-done is executed under a freeze "lock"). All steps of a goto of
a single unit if the client issues the goto command are executed with
the freeze "lock". So they are also merged. There should only be one
update of the city status after the unit finished moving.

I wasn't able to reproduce this problem here. So please apply the
patch and post the relevant output.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Last year, out in California, at a PC users group, there was a demo of
  smart speech recognition software. Before the demonstrator could begin
  his demo, a voice called out from the audience: "Format c, return. Yes,
  return." Damned short demo, it was.

Index: client/packhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v
retrieving revision 1.306
diff -u -u -r1.306 packhand.c
--- client/packhand.c   2003/05/08 03:06:58     1.306
+++ client/packhand.c   2003/06/11 08:46:53
@@ -702,6 +702,7 @@
 **************************************************************************/
 void handle_before_new_year(void)
 {
+    freelog(LOG_NORMAL, "handle_before_new_year");
   clear_notify_window();
   /*
    * The local idea of the game turn is increased here since the
@@ -720,6 +721,7 @@
 **************************************************************************/
 void handle_start_turn(void)
 {
+    freelog(LOG_NORMAL, "handle_start_turn");
   agents_start_turn();
   non_ai_unit_focus = FALSE;
 
@@ -964,6 +966,8 @@
       /* change position */
       struct city *pcity = map_get_city(punit->x, punit->y);
 
+      freelog(LOG_NORMAL, "unit %d moves from (%d,%d) to (%d,%d)",
+             packet->id, punit->x, punit->y, packet->x, packet->y);
       old_x = punit->x;
       old_y = punit->y;
       moved = TRUE;
@@ -2468,7 +2472,7 @@
       get_next_request_id(aconnection.
                          client.last_processed_request_id_seen);
 
-  freelog(LOG_DEBUG, "start processing packet %d",
+  freelog(LOG_NORMAL, "start processing packet %d",
          aconnection.client.request_id_of_currently_handled_packet);
 }
 
@@ -2479,7 +2483,7 @@
 {
   int i;
 
-  freelog(LOG_DEBUG, "finish processing packet %d",
+  freelog(LOG_NORMAL, "finish processing packet %d",
          aconnection.client.request_id_of_currently_handled_packet);
 
   assert(aconnection.client.request_id_of_currently_handled_packet != 0);
Index: client/agents/agents.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/agents/agents.c,v
retrieving revision 1.25
diff -u -u -r1.25 agents.c
--- client/agents/agents.c      2003/04/04 15:47:46     1.25
+++ client/agents/agents.c      2003/06/11 08:46:53
@@ -36,7 +36,7 @@
 #define DEBUG_TODO_LISTS               FALSE
 #define META_CALLBACKS_LOGLEVEL                LOG_DEBUG
 #define PRINT_STATS_LOGLEVEL           LOG_DEBUG
-#define DEBUG_FREEZE                   FALSE
+#define DEBUG_FREEZE                   TRUE
 #define MAX_AGENTS                     10
 
 struct my_agent;
Index: common/aicore/cm.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/aicore/cm.c,v
retrieving revision 1.8
diff -u -u -r1.8 cm.c
--- common/aicore/cm.c  2003/05/13 07:04:28     1.8
+++ common/aicore/cm.c  2003/06/11 08:46:54
@@ -137,7 +137,7 @@
 #define OPTIMIZE_FINAL_LOG_LEVEL                       LOG_DEBUG
 #define OPTIMIZE_FINAL_LOG_LEVEL2                      LOG_DEBUG
 #define FIND_BEST_SPECIALIST_ARRANGEMENT_LOG_LEVEL     LOG_DEBUG
-#define CM_QUERY_RESULT_LOG_LEVEL                      LOG_DEBUG
+#define CM_QUERY_RESULT_LOG_LEVEL                      LOG_NORMAL
 #define CALC_FITNESS_LOG_LEVEL                         LOG_DEBUG
 #define CALC_FITNESS_LOG_LEVEL2                                LOG_DEBUG
 #define EXPAND_CACHE3_LOG_LEVEL                                LOG_DEBUG

[Prev in Thread] Current Thread [Next in Thread]