[Freeciv-Dev] [patch #4564] Call is_airunit_refuel_point() only when needed

2014-03-15 Thread Marko Lindqvist
Update of patch #4564 (project freeciv):

  Status:None => Invalid
 Assigned to:None => cazfi  
 Open/Closed:Open => Closed 

___

Follow-up Comment #1:

Inspected the code, all callers seem ok. I guess all the calls come from AI
playing with virtual air units, long before they are even available, to
determine how useful they would be.

___

Reply to this item at:

  

___
  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] [patch #4564] Call is_airunit_refuel_point() only when needed

2014-03-01 Thread Marko Lindqvist
URL:
  

 Summary: Call is_airunit_refuel_point() only when needed
 Project: Freeciv
Submitted by: cazfi
Submitted on: Sat 01 Mar 2014 11:04:33 PM EET
Category: ai
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: 

___

Details:

In patch #4563 I said:
"Profiling server running autogame shows checking if tile is refuel point as
one of the functions taking most time."

That is surprising also because the function should be needed for a couple of
unit types only. It's probably being called too much. All the callers should
first make the inexpensive checks like that unit is using fuel at all before
calling expensive is_airunit_refuel_point().





___

Reply to this item at:

  

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


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