[
https://issues.apache.org/jira/browse/IGNITE-24107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914737#comment-17914737
]
Pavel Pereslegin edited comment on IGNITE-24107 at 1/20/25 5:18 PM:
--------------------------------------------------------------------
Implementing {{ExpandableByteBuffer}} was a bad idea, at least because
"transparently" expanding the buffer when placing data at the specified index
(given that this is not needed in our use cases) can have a performance impact
(extra buffer size check).
It would be more correct to add an ByteBuffer allocator and instead of
{code:java}
ByteBuffer newBuffer = ByteBuffer.allocate(capacity);
{code}
use
{code:java}
ByteBuffer newBuffer = allocator.allocate(capacity);
{code}
was (Author: xtern):
Implementing {{ExpandableByteBuffer}} was a bad idea, at least because
"transparently" expanding the buffer when placing data at the specified index
(given that this is not needed in our use cases) can have a performance impact
(extra buffer size check).
> Allow to use an existing buffer in BinaryTupleBuilder
> -----------------------------------------------------
>
> Key: IGNITE-24107
> URL: https://issues.apache.org/jira/browse/IGNITE-24107
> Project: Ignite
> Issue Type: Improvement
> Reporter: Maksim Zhuravkov
> Assignee: Pavel Pereslegin
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Sometimes we want to write a tuple into an existing buffer but
> BinaryTupleBuilder always allocates a new buffer for each binary tuple it
> builds. Let's update BinaryTupleBuilder to accept a component that allocates
> a buffer used by BinaryTupleBuilder.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)