[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-18 Thread Jacob Nevins
Update of bug #20905 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-16 Thread Jacob Nevins
Update of bug #20905 (project freeciv):

  Status: In Progress = Ready For Test 
 Assigned to:None = jtn
 Planned Release: = 2.3.5,2.4.0,2.5.0,2.6.0

___

Follow-up Comment #4:

Attached a proposed final patch which removes the droppings on boundary
conditions.

This introduces a slightly expensive test in every execution of the client's
handle_unit_packet_common(), although most invocations should bail out pretty
quickly. I propose to commit anyway, but if anyone thinks this is too many, we
could look at caching the has-a-city-outline status in the unit structure on
the client side.

(file #18097, file #18098, file #18099)
___

Additional Item Attachment:

File name: trunk-S2_5-city-builders-redraw.patch Size:4 KB
File name: S2_4-city-builders-redraw.patch Size:4 KB
File name: S2_3-city-builders-redraw.patch Size:4 KB


___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-15 Thread Jacob Nevins
URL:
  http://gna.org/bugs/?20905

 Summary: City-building unit movement drawing is slower than
other units
 Project: Freeciv
Submitted by: jtn
Submitted on: Sun Jun 16 00:30:33 2013
Category: client
Severity: 2 - Minor
Priority: 5 - Normal
  Status: In Progress
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

Reported by mrvn and others (I've noticed it for ages, but mrvn made the key
observation that a large area around the unit was being redrawn):

Moving settler-type units around the map can be noticeably slower in the
client than other units.

We stopped city outlines being drawn for intermediate steps of units with
orders in bug #14612, but it's still slow in this situation.

Bug #14612 changed fill_grid_sprite_array(), which decides whether to draw the
city boundary (etc) on a tile-by-tile basis. However, the decision how much to
redraw is elsewhere; in refresh_unit_mapcanvas(), I think, where the entire
city map area is redrawn for UTYF_CITIES units in any circumstances.




___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-15 Thread anonymous
Follow-up Comment #1, bug #20905 (project freeciv):

In client/mapview_common.c: refresh_unit_mapcanvas() a unit with F_CITIES set
adds to the TILE_UPDATE_CITYMAP queue while other units only add to the
TILE_UPDATE_UNIT queue. I believe this is so that the city outlines can be
drawn correctly.

There are two things wrong with this:

1) If draw_city_outlines is not set then this is totaly unneccessary. See
attached patch.

2) Even with draw_city_outlines the outlines only cover
game.info.init_city_radius_sq tiles. But TILE_UPDATE_CITYMAP draws an area
covering the largest city map in existance.

MfG,
   Mrvn
--
Patch: The patch makes settlers fast if city outlines are disabled. If they
are enabled they are still slow.


(file #18093)
___

Additional Item Attachment:

File name: 2.4-faster-settler.patch   Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-15 Thread anonymous
Additional Item Attachment, bug #20905 (project freeciv):

File name: 2.4-faster-settler.patch   Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-15 Thread Jacob Nevins
Follow-up Comment #2, bug #20905 (project freeciv):

Attached work-in-progress patch.
Definitely speeds things up, and some work done to remove droppings left on
edge conditions, but some remain (notably when moving on/off a tile unsuitable
for a city).

When testing this, setting init_city_radius_sq = 26 in game.ruleset is useful,
because the city-map-sized redraw is the compile-time maximum, so smaller
run-time city outlines might appear to work due to the over-redrawing.

(file #18095)
___

Additional Item Attachment:

File name: 20905-trunk-wip.patch  Size:4 KB


___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #20905] City-building unit movement drawing is slower than other units

2013-06-15 Thread Jacob Nevins
Follow-up Comment #3, bug #20905 (project freeciv):

 2) Even with draw_city_outlines the outlines only cover 
 game.info.init_city_radius_sq tiles. But TILE_UPDATE_CITYMAP 
 draws an area covering the largest city map in existance.
Or rather than largest city map the game knows about.

If after patching everything else, this is still bothersome, we could invent a
TILE_UPDATE_MINCITYMAP for this particular case.

___

Reply to this item at:

  http://gna.org/bugs/?20905

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev