]> git.pond.sub.org Git - empserver/commit - include/nat.h
contact: Move contact state from struct natstr to contactstr
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 25 Oct 2016 17:38:02 +0000 (19:38 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:20 +0000 (20:09 +0200)
commitc8e7548f249b7400a6726efb86b0456d6cd50a03
tree828b577e7547ddf7df5821cd1dda3e80662d27da
parent4b4df53485d92c74412fa7cbc7cf1f1d9bfce8c7
contact: Move contact state from struct natstr to contactstr

Contact state is relatively bulky: it's a big chunk of struct natstr,
and adds almost 200 bytes per country to xdump nat for deities.

Contact changes rarely.  Since we avoid unnecessary updates, it
doesn't change at all unless option HIDDEN is enabled.  Rewriting it
to disk on every nation update and retransmitting it in every deity
xdump nat is wasteful.

To avoid this waste, move contact state to its own struct contactstr.

This is of course an xdump compatibility break.  We're not maintaining
xdump compatibility in this release.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
19 files changed:
include/nat.h
src/lib/common/filetable.c
src/lib/common/nat.c
src/lib/common/nsc.c
src/lib/subs/rej.c
tests/actofgod/final.xdump
tests/bridgefall/final.xdump
tests/build/final.xdump
tests/fairland/final.xdump
tests/files/final.xdump
tests/fire/final.xdump
tests/navi-march/final.xdump
tests/retreat/final.xdump
tests/smoke/fairland.xdump
tests/smoke/final.xdump
tests/smoke/journal.log
tests/torpedo/final.xdump
tests/update/final.xdump
tests/version/journal.log