masesgroup / masesgroup/KNet

Update `KeyValue<K, V, TJVMK, TJVMV>` to use object pooling

Open
#1,903 0 comments 0 reactions 1 assignee View on GitHub

@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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.