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

Pavel Tupitsyn updated IGNITE-6372:
-----------------------------------
    Description: 
{{cache.get}} from .NET (thick client with in-process JVM) works currently like 
this:

* Java {{cache.withKeepBinary().get()}}: copy a piece of unmanaged memory from 
off-heap to {{byte[]}}
* Java {{BinaryWriter.write}}: copy {{byte[]}} to unmanaged memory
* .NET {{BinaryReader.Read}}: deserialize object from unmanaged memory

So there are two unnecessary memory copy operations.

Ideally we should be able to pass off-heap pointer to .NET and read from there 
directly (this may be complicated due to page memory architecture where object 
can span across pages).

At least we can try to eliminate first copy to {{byte[]}} and copy from page 
memory to a stream directly via some additional {{BinaryObject}} 
implementation. This also removes GC pressure.

  was:
{{cache.get}} from .NET (thick client with in-process JVM) works currently like 
this:

* Java {{cache.withKeepBinary().get()}}: copy a piece of unmanaged memory from 
off-heap to {{byte[]}}
* Java {{BinaryWriter.write}}: copy {{byte[]}} to unmanaged memory
* .NET {{BinaryReader.Read}}: deserialize object from unmanaged memory

So there are two unnecessary memory copy operations.

Ideally we should be able to pass off-heap pointer to .NET and read from there 
directly (this may be complicated due to page memory architecture where object 
can span across pages).

At least we can try to eliminate first copy to {{byte[]}} and copy from page 
memory to a stream directly via some additional {{BinaryObject}} implementation.


> .NET: Direct offheap access
> ---------------------------
>
>                 Key: IGNITE-6372
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6372
>             Project: Ignite
>          Issue Type: Improvement
>          Components: platforms
>            Reporter: Pavel Tupitsyn
>            Priority: Minor
>              Labels: .NET, optimization
>
> {{cache.get}} from .NET (thick client with in-process JVM) works currently 
> like this:
> * Java {{cache.withKeepBinary().get()}}: copy a piece of unmanaged memory 
> from off-heap to {{byte[]}}
> * Java {{BinaryWriter.write}}: copy {{byte[]}} to unmanaged memory
> * .NET {{BinaryReader.Read}}: deserialize object from unmanaged memory
> So there are two unnecessary memory copy operations.
> Ideally we should be able to pass off-heap pointer to .NET and read from 
> there directly (this may be complicated due to page memory architecture where 
> object can span across pages).
> At least we can try to eliminate first copy to {{byte[]}} and copy from page 
> memory to a stream directly via some additional {{BinaryObject}} 
> implementation. This also removes GC pressure.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to