Potential Performance Improvement: Sharing NioEventLoopGroups across modules

Open
#4,088 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
java

Research direction

Start in xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java around line 194, where each service creates an EventLoopGroup. Trace the group’s ownership and shutdown lifecycle across multiple streaming services, then determine how sharing should be configured and cleaned up. Done means multiple modules can reuse a NioEventLoopGroup without unnecessary resource creation.

Written by the indexing model from the issue text.

Description

Noticed that each imp of a NettyStreamingService will use a newly created EventLoopGroup:
https://github.com/knowm/XChange/blob/develop/xchange-stream-service-netty/src/main/java/info/bitrich/xchangestream/service/netty/NettyStreamingService.java#L194

When utilizing multiple modules, this becomes quite resource intensive. Worth looking into an option to share a NioEventLoopGroup across streaming services?

Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
2d 12h
Merged PRs (30d)
21

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from knowm/XChange

All issues in knowm/XChange

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.