Provide API to pool `CSteamNetworkingMessage`
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- cpp
- 領域
- networking
調査の方向性
まず、CSteamNetworkingMessage 周辺の src/steamnetworkingsockets/clientlib/steamnetworkingsockets_connections.cpp を確認し、AllocateMessage()、m_links、m_linksSecondaryQueue を調べます。公開されている m_pfnRelease API と m_pfnFreeData API をたどり、割り当てられたメッセージと受信したメッセージの両方でプーリングがどのように機能すべきかを検討してください。API が、private フィールドやレイアウトに関する仮定に依存せずにメッセージ構造体を再利用するための、サポートされた方法を提供すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
It seems that CSteamNetworkingMessage doesn't pool messages.
This means that for each call to ISteamNetworkingUtils::AllocateMessage(), it dynamically allocates 264 bytes structure (on 64-bit environments).
This could be slow if you need to send loads of messages frequently.
I tried providing my own version of AllocateMessage() that allocates a message from my own pool, and initialize the CSteamNetworkingMessage properly.
But I realized you can't do that, because there's no way to initialize CSteamNetworkingMessage's private fields: m_links & m_linksSecondaryQueue
(Well, technically, I can just memset(msg, 0, 264) to initialize the hidden fields...
But not only that's UB, I can't tell if Steamworks SDK version of the message uses the same CSteamNetworkingMessage under the hood.)
It would be nice if there's an way to pool the message structure itself with the exposed m_pfnRelease,
like you can with m_pfnFreeData for the payloads.
Also, it would be great if you can also pool the message structure for the received messages too.
- 主要言語
- C++
- スター
- 9.9k
- フォーク
- 749
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ValveSoftware/GameNetworkingSockets のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ValveSoftware/GameNetworkingSockets の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ros2/message_filters#338 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
subsurface/subsurface#4984 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
google-ai-edge/LiteRT-LM#3739 ·