URL:
<http://gna.org/patch/?4563>
Summary: Unit class refuel bases cache
Project: Freeciv
Submitted by: cazfi
Submitted on: Sat 01 Mar 2014 10:32:25 PM EET
Category: ai
Priority: 5 - Normal
Status: Ready For Test
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.5.0, 2.6.0
_______________________________________________________
Details:
Profiling server running autogame shows checking if tile is refuel point as
one of the functions taking most time. That even in S2_5 where we iterate only
over base types to find refuel bases. I think TRUNK situation is worse as
there all the extras (including roads and specials) are being iterated over.
Attached patch adds cache created ruleset loading time listing extra types
that can act as refuel point for the unit class. Iterating over that list only
(typically 0-2 entries) should be much faster than always going through all
the extra types and also checking if they are sufficient (most of that too can
be skipped as we know that anything in cache is sufficient)
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Sat 01 Mar 2014 10:32:25 PM EET Name: RefuelBaseCache.patch Size: 4kB
By: cazfi
<http://gna.org/patch/download.php?file_id=20217>
-------------------------------------------------------
Date: Sat 01 Mar 2014 10:32:25 PM EET Name: RefuelBaseCache-S2_5.patch Size:
5kB By: cazfi
<http://gna.org/patch/download.php?file_id=20218>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?4563>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev