Follow-up Comment #1, patch #5357 (project freeciv):
I wonder if this helps with bug #22159?
IRC log leading to this patch (includes link to test case):
07:20 < aloril> seems client slows down exponentially with deeper tech tree?
(tested with 2.5 beta1 and copy of experimental ruleset, at
end
of techs.ruleset add http://pastebin.com/jZ2GuyQb or even up
to
transtech5/transtech10 (IIRC worked fine in 2.3.0-RC2 ,
copied
it from copied and modified version of its experimental
techs.ruleset)
07:21 < aloril> tech.c player_invention_reachable might be the culprit
08:12 < aloril> memoization fixes it by converting it to linear lookup and not
changing code logic at all
08:14 < aloril> exponential -> linear speedup: its now fast
08:22 < aloril> quick and a bit ugly fix: http://pastebin.com/hf8PEU3H
08:44 < akfaew> does this cache take into account losing techs?
08:45 < aloril> it recalculates it at every call, I'm assuming it stays
constant during thus call though
08:45 < aloril> *this
08:48 < aloril> cache resides in stack and is discarded after call (see code
for details)
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?5357>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev