[ 
https://issues.apache.org/jira/browse/IGNITE-1963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Sapego updated IGNITE-1963:
--------------------------------
    Description: 
Current design of the {{InteropMemory}} class got some unavoidable overheads 
and makes it difficult to implement adapter-like subclasses.
1. Considering that {{InteropMemory}} is the only class that can be used with 
binary streams and binary readers/writers, it should have design that allows 
writing adapter subclasses. For example, it could be std::vector class adapter 
or stack-allocated array.
2. Current {{InteropUnpooledMemory}} implementation makes two heap memory 
allocations during instance creating for all children. It's a big overhead 
considering that memory allocations happen often.
3. Consider replacing this class into two classes: read/write memory and read 
only memory. It makes sense because Input streams do not modify memory they 
operate on and It would allow us to implement reading in a more efficient way 
because we wont be needing to implement {{Reallocate()}} method anymore.

  was:Current design of the InteropMemory class got some unavoidable overheads 
and makes it difficult to implement adapter-like subclasses.


> CPP: Optimize interop memory
> ----------------------------
>
>                 Key: IGNITE-1963
>                 URL: https://issues.apache.org/jira/browse/IGNITE-1963
>             Project: Ignite
>          Issue Type: Task
>    Affects Versions: ignite-1.4
>            Reporter: Igor Sapego
>            Priority: Minor
>
> Current design of the {{InteropMemory}} class got some unavoidable overheads 
> and makes it difficult to implement adapter-like subclasses.
> 1. Considering that {{InteropMemory}} is the only class that can be used with 
> binary streams and binary readers/writers, it should have design that allows 
> writing adapter subclasses. For example, it could be std::vector class 
> adapter or stack-allocated array.
> 2. Current {{InteropUnpooledMemory}} implementation makes two heap memory 
> allocations during instance creating for all children. It's a big overhead 
> considering that memory allocations happen often.
> 3. Consider replacing this class into two classes: read/write memory and read 
> only memory. It makes sense because Input streams do not modify memory they 
> operate on and It would allow us to implement reading in a more efficient way 
> because we wont be needing to implement {{Reallocate()}} method anymore.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to