Update `KeyValue<K, V, TJVMK, TJVMV>` to use object pooling
Open
@masesdevelopers is already working on this.
Since Jun 26, 2026.
.NET
enhancement
KNet
- Dominant language
- C#
- Stars
- 52
- Forks
- 5
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 35
Description
The class KeyValue<K, V, TJVMK, TJVMV> in https://github.com/masesgroup/KNet/blob/261e9b044561c42b0a8df8fa10aad5640e73354d/src/net/KNet/Specific/Streams/KeyValue.cs#L32 , or other like it, are intensely created during application lifetime, however the life of each object can be very short. Since KNet can access the Microsoft.Extensions.ObjectPool using the dependency of Microsoft.IO.RecyclableMemoryStream the objects can be simply reused when intensively requested.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.