sunhaibotb edited a comment on issue #8124: [FLINK-11877] Implement the runtime 
handling of the InputSelectable interface
URL: https://github.com/apache/flink/pull/8124#issuecomment-490388025
 
 
   @pnowojski , the code has been updated and it relies on the latest version 
of [PR-7959](https://github.com/apache/flink/pull/7959).
   
   - The throughput difference of `StreamTwoInputSelectableProcessor` to 
`StreamTwoInputProcessor` dropped from 3.51% to 2.88%.  That is to say,  
**`StreamTwoInputSelectableProcessor` is still 2.88% slower than 
`StreamTwoInputProcessor`**.
   
     - Benchmark Results (run three times benchmark to calculate the average)
     `StreamTwoInputSelectableProcessor`: 23151 ops/ms
     `StreamTwoInputProcessor`: 23839 ops/ms
   
     - If the code which deserializes  elements from the buffers is put into 
`StreamTwoInputSelectableProcessor#processInput()`, the performance will be 
greatly improved (I tested it before and see below for code structure). But 
this deviates from the purpose of abstracting the `Input` interface.  **Is 
Digging JIT-optimization the next direction?  Or is the performance regression 
acceptable under the current structure?**
   
   ```
   === StreamTwoInputXProcessor.java ===
   public boolean processInput() throws Exception {
        while (true) {
                ...
                if (currentRecordDeserializer != null) {
                        DeserializationResult result = 
currentRecordDeserializer.getNextRecord(deserializationDelegate1);
                        if (result.isFullRecord()) {
                                element = 
deserializationDelegate1.getInstance();
                }
                ...
        }
   }
   ```
   
   - The related code of `Input#listen()` is temporary and has not been 
modified to base on your [PR-8361](https://github.com/apache/flink/pull/8361). 
Replacing listeners with `CompletableFuture` in `InputGates` is a very good 
design, and the old interface is really awkward to `Input`. **Next, do I put 
this PR on the top of your 
[PR-8361](https://github.com/apache/flink/pull/8361)?**
   
   P.S., the benchmark code has been split into the new 
[PR-8368](https://github.com/apache/flink/pull/8368).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to