#46496: Counters: Adjust network protocol Open Date: 2023-01-09 14:21 Last Update: 2023-02-05 05:09 URL for this Ticket: https://osdn.net//projects/freeciv/ticket/46496 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46496 --------------------------------------------------------------------- Last Changes/Comment on this Ticket: 2023-02-05 05:09 Updated by: lachu Comment: Reply To cazfi The patch does not apply to master. 0001-OSDN-TICKET-46496-S-awomir-Lach-slawek-lach.art.pl.patch(6KB) Now it should apply My bad. I apply message at top of my patches to test. When I switch to working branch again, I do changes, which was at top. Now, I squash newest changes to oldest (before testing commits) and it apply at top of master. I also update master. --------------------------------------------------------------------- Ticket Status: Reporter: cazfi Owner: (None) Type: Patches Status: Open Priority: 5 - Medium MileStone: S3_2 npf Component: General Severity: 5 - Medium Resolution: None --------------------------------------------------------------------- Ticket details: As noted by lachu in #45889, delta protocol currently considers each counter package to replace others - i.e. even unchanged counters get sent because another counter has been sent in between. Simplest way to fix this would be to make both the "counter owner" (e.g. city id, in case of city counters) and counter id keys, but that would mean num cities * num counters separate packages to be kept. Also, calling send_...() separately for each counter is a bit heavier task than it needs to be. Maybe rearrange network protocol so that entire counter array is sent as a single package (delta protocol would still skip elements that have not changed) and just the owner (city id) is the key - this would *also* mean that city id is sent just once for the entire array, and not once for each separate counter value. Once we have multiple counter_target types, it's probably better to have separate packet type for each than to include the target type in the package (and have that affect how the "owner" id gets interpreted) -- Ticket information of Freeciv project Freeciv Project is hosted on OSDN Project URL: https://osdn.net/projects/freeciv/ OSDN: https://osdn.net URL for this Ticket: https://osdn.net/projects/freeciv/ticket/46496 RSS feed for this Ticket: https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=46496