[ 
https://issues.apache.org/jira/browse/IGNITE-15234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17441871#comment-17441871
 ] 

Pavel Tupitsyn commented on IGNITE-15234:
-----------------------------------------

{code}
**Benchmarks Before:**

```
Benchmark                                 Mode  Cnt        Score        Error  
Units
ClientMessagePackerBenchmark.packInt     thrpt    3  2868266.504 ± 173548.310  
ops/s
ClientMessagePackerBenchmark.packString  thrpt    3  2663375.726 ± 190027.949  
ops/s
ClientMessagePackerBenchmark.packUuid    thrpt    3  2816744.141 ± 281943.169  
ops/s
```

**Benchmarks After:**

```
Benchmark                                 Mode  Cnt          Score          
Error  Units
ClientMessagePackerBenchmark.packInt     thrpt    3  389568322.545 ± 
48247870.394  ops/s   (135x)
ClientMessagePackerBenchmark.packString  thrpt    3   30113891.585 ±  
1781762.180  ops/s   (11x)
ClientMessagePackerBenchmark.packUuid    thrpt    3  331495906.854 ± 
12134046.484  ops/s   (117x)
```

NOTE: Those benchmarks include `ClientMessagePacker` constructor call.
{code}

> Thin 3.0: Perf: ByteBuf-based message packer and unpacker
> ---------------------------------------------------------
>
>                 Key: IGNITE-15234
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15234
>             Project: Ignite
>          Issue Type: Improvement
>          Components: thin client
>    Affects Versions: 3.0.0-alpha3
>            Reporter: Pavel Tupitsyn
>            Assignee: Pavel Tupitsyn
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-alpha4
>
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Current implementations of *ClientMessagePacker* and *ClientMessageUnpacker* 
> are based on *msgpack-core* library and involve intermediate classes and 
> buffers:
> {code:java}
>     public ClientMessageUnpacker(ByteBuf buf) {
>         super(new InputStreamBufferInput(new ByteBufInputStream(buf)), 
> MessagePack.DEFAULT_UNPACKER_CONFIG);
>         this.buf = buf;
>     }
> {code}
> * MessageUnpacker and MessagePacker classes use internal heap-allocated 
> buffers
> * InputStreamBufferInput uses another buffer
> Netty ByteBuf is efficient by itself, we can implement packer and unpacker 
> directly on top of it without extra buffers and indirection.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to