You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File - server/src/main/java/com/flipkart/varadhi/web/v1/produce/ProduceHandlers.java
method - produce()
Below needs to be fixed.
// TODO:: Below is making extra copy, this needs to be avoided.
// ctx.body().buffer().getByteBuf().array() -- method gives complete backing array w/o copy,
// however only required bytes are needed. Need to figure out the correct mechanism here.
byte[] payload = ctx.body().buffer().getBytes();
Currently above code is doing a copy of the produce payload and adds same to the message buffer. This copy of payload is extra and can be avoided.
Expected:
Investigate, how underlying buffer reference can be passed in the message instead of copy. Intent is to avoid copy of data in Varadhi and instead pass input buffer directly to the underlying messaging stack. Reason for doing this is primarily performance.
Investigate and propose 1 pager for the required changes before starting on implementation.
The text was updated successfully, but these errors were encountered:
File - server/src/main/java/com/flipkart/varadhi/web/v1/produce/ProduceHandlers.java
method - produce()
Below needs to be fixed.
Currently above code is doing a copy of the produce payload and adds same to the message buffer. This copy of payload is extra and can be avoided.
Expected:
Investigate, how underlying buffer reference can be passed in the message instead of copy. Intent is to avoid copy of data in Varadhi and instead pass input buffer directly to the underlying messaging stack. Reason for doing this is primarily performance.
Investigate and propose 1 pager for the required changes before starting on implementation.
The text was updated successfully, but these errors were encountered: