keva-dev / keva-dev/keva

Implement ByteArray pool allocator && String pool

Open
#69 4 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #72 by @tuhuynh27 — merged
evaluation help wanted
Dominant language
Java
Stars
109
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Issue: There is a lot of byte[] allocated when handling TCP messages:

image

It's better to have a ByteArray pool allocator so that byte[] can be reused and avoid creating massive garbage for the GC and the throughput can be even better.

For example:

ByteArrayPoolAllocator pool = ByteArrayPoolAllocator.DEFAULT
byte[10] obj = byteArrayPool.getByteArray(10);

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.

Research direction

Start by reviewing the TCP message handling path and the proposed ByteArrayPoolAllocator example in this issue. Check closed pull request #72 for prior work on the allocator and string pool. Done means the pooling approach is implemented for the relevant allocations and its effect on garbage creation and throughput is validated.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, networking, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.