bloomberg / bloomberg/blazingmq-sdk-java

Reduce data copying

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
A-Client bug
Dominant language
Java
Stars
34
Forks
19
Avg merge
7h
Merged PRs (30d)
27

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior

Currently, there is a lot of time spent copying payload data.

Especially onerous is an entire copy made just to generate a crc32c of the payload.

Using the pack() / flush() API should be be more efficient.

Also, ByteBufferOutputStream copies incoming ByteBuffer contents to "pack" the data. Instead, the incoming ByteBuffers can be appended as-is.

![bmq-sink-put](https://github.com/bloomberg/blazingmq-sdk-java/assets/12381503/a859cdfa-8962-4fbf-868b-4d5a4d9cf7d0)

### Expected Behavior

_No response_

### Steps To Reproduce

put a high volume of messages into a queue while using Java Flight Recorder to profile the method execution times.

### BlazingMQ Java SDK Version

0.0.9

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.