OpenTTD/src/network
Peter Nelson 33aedc43a5 Codechange: Shrink GUIList vectors less often, reserve before use.
After sorting and filter lists for GUI, we often shirnk them to reduce size. However this has very little benefit:

1) The memory has already been allocated, so it doesn't prevent that memory being required.
2) It causes a new allocation and copy when the vector is shrunk, actually using more memory.
3) The list is in window state, so the lifetime is only while the window is open.
4) When a filter is clearer, the original size will be needed again, which will cause another allocation.

In fact it is beneficial to reserve to the known maximum in most cases, so do that instead.
2024-04-27 19:25:34 +01:00
..
core Codechange: Replace C-style casts to size_t with static_cast. (#12455) 2024-04-19 20:34:36 +01:00
CMakeLists.txt Codechange: add set of classes providing authentication and encryption 2024-03-17 18:33:53 +01:00
network.cpp Codechange: improve desync documentation (#12521) 2024-04-17 20:36:08 +00:00
network.h Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
network_admin.cpp Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
network_admin.h Fix #10983: [AdminPort] Correct order of messages 2024-02-18 15:11:00 +01:00
network_base.h Codechange: Split dates and timers into Economy and Calendar time (#10700) 2024-01-22 09:04:34 -05:00
network_chat_gui.cpp Add: Basic autocompletion on tab for console commands (#12163) 2024-03-13 21:43:08 +01:00
network_client.cpp Fix fb9d4af: use different nonces for key exchange and stream encryption 2024-03-31 15:14:16 +02:00
network_client.h Feature: encrypt the connection between game server and client 2024-03-17 19:48:34 +01:00
network_command.cpp Codechange: rename byte to uint8_t (#12308) 2024-03-16 23:59:32 +01:00
network_content.cpp Codechange: Use map.emplace() instead of map.insert(std::pair). 2024-04-20 10:25:20 +01:00
network_content.h Fix fdfcb09: for content service, fallback to TCP downloads when HTTP stalls (#12056) 2024-02-11 20:24:28 +01:00
network_content_gui.cpp Codechange: Shrink GUIList vectors less often, reserve before use. 2024-04-27 19:25:34 +01:00
network_content_gui.h Codechange: Pass by reference to UpdateWidgetSize. (#12457) 2024-04-09 08:34:45 +01:00
network_coordinator.cpp Codechange: pass the socket handler that is going to send the packet into the packet 2024-03-16 10:39:22 +01:00
network_coordinator.h Codechange: use references for handling received TCP packets 2024-02-05 16:30:49 +01:00
network_crypto.cpp Fix fb9d4af: use different nonces for key exchange and stream encryption 2024-03-31 15:14:16 +02:00
network_crypto.h Fix fb9d4af: use different nonces for key exchange and stream encryption 2024-03-31 15:14:16 +02:00
network_crypto_internal.h Fix fb9d4af: use different nonces for key exchange and stream encryption 2024-03-31 15:14:16 +02:00
network_func.h Codechange: improve desync documentation (#12521) 2024-04-17 20:36:08 +00:00
network_gamelist.cpp Codechange: make the MD5 hash/digest/checksum variables a std::array 2023-05-19 11:24:44 +02:00
network_gamelist.h Codechange: workaround CMake/Xcode duplicate file name issue (#11186) 2023-09-02 19:46:52 +02:00
network_gui.cpp Codechange: Shrink GUIList vectors less often, reserve before use. 2024-04-27 19:25:34 +01:00
network_gui.h Feature: authenticate to the server without sending the password 2024-03-17 19:09:22 +01:00
network_internal.h Codechange: use infinite-fast-forward when rerunning command-log (#12519) 2024-04-17 20:01:58 +00:00
network_query.cpp Codechange: pass the socket handler that is going to send the packet into the packet 2024-03-16 10:39:22 +01:00
network_query.h Codechange: use references for handling received TCP packets 2024-02-05 16:30:49 +01:00
network_server.cpp Fix fb9d4af: use different nonces for key exchange and stream encryption 2024-03-31 15:14:16 +02:00
network_server.h Feature: console command to change authorized keys 2024-03-17 21:21:33 +01:00
network_stun.cpp Codechange: pass the socket handler that is going to send the packet into the packet 2024-03-16 10:39:22 +01:00
network_stun.h Codechange: use std::shared_ptr for vector of TCPConnecters 2024-01-20 23:03:44 +01:00
network_survey.cpp Add: track savegame size to report with survey (#12304) 2024-03-16 08:58:56 +01:00
network_survey.h Fix: don't unneededly block on transmitting survey on exit (#11687) 2024-01-05 18:54:00 +00:00
network_turn.cpp Codechange: pass the socket handler that is going to send the packet into the packet 2024-03-16 10:39:22 +01:00
network_turn.h Codechange: use references for handling received TCP packets 2024-02-05 16:30:49 +01:00
network_type.h Codechange: move 'months_empty' to CompanyProperties 2024-03-23 11:59:34 +01:00
network_udp.cpp Codechange: pass the socket handler that is going to send the packet into the packet 2024-03-16 10:39:22 +01:00
network_udp.h Remove: old server listing via Master Server 2021-07-10 20:17:07 +02:00