Summary: Consolidate server precalcs and cache population
Submitted by: persia
Submitted on: Sun 13 Jul 2014 07:13:03 AM JST
Priority: 5 - Normal
Status: Ready For Test
Assigned to: persia
Discussion Lock: Any
Planned Release: 2.6.0
In the client, most of the precalculation and cache population happens in
handle_rulesets_ready(), but in the server, it happens in several places,
making the order in which ruleset files are loaded very important (as there
are subtle bugs with caches not being properly populated for the wrong order),
and needing care to avoid use-without-assignment issues (such as bug #22014 or
problems with set_unit_class_caches() introduced with patch #4649 ).
This patch consolidates that in load_rulesetdir(), and further moves the
improvement feature cache to improvement.c, rather than being duplicate logic
in ruleset.c and packhand.c.
I'm not quite sure why role_unit_precalcs() is in set_client_state() rather
than handle_rulesets_ready(), so I've left it there for now.
Date: Sun 13 Jul 2014 07:13:03 AM JST Name:
consolidate-server-precalcs-and-cache-population.patch Size: 5kB By: persia
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list