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
                of techs.ruleset add or even up
                transtech5/transtech10  (IIRC worked fine in 2.3.0-RC2 ,
                it from copied and modified version of its experimental 
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:
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:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to