sunhaibotb commented on a change in pull request #8409: [FLINK-12478] Decompose 
monolithic run-loops in StreamTask implementa…
URL: https://github.com/apache/flink/pull/8409#discussion_r284765841
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTask.java
 ##########
 @@ -98,13 +96,8 @@ public void init() throws Exception {
        }
 
        @Override
-       protected void run() throws Exception {
-               // cache processor reference on the stack, to make the code 
more JIT friendly
-               final StreamInputProcessor<IN> inputProcessor = 
this.inputProcessor;
-
-               while (running && inputProcessor.processInput()) {
-                       // all the work happens in the "processInput" method
-               }
+       protected boolean performDefaultAction() throws Exception {
 
 Review comment:
   > last but not least the method call could be insignificant in the larger 
context.
   
   I quite agree with that.
   
   If we narrow down the context and just start to measure from the loop (like 
the benchmark of [PR-8124](https://github.com/apache/flink/pull/8124)), the 
difference should show up. But considering in the context of a job,  especially 
for most production jobs,this difference may have only a slight impact and can 
be ignored. So it's fine to me. @pnowojski, what do you think?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to