You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/05/16 07:22:06 UTC

[GitHub] [flink] pnowojski commented on a change in pull request #8409: [FLINK-12478] Decompose monolithic run-loops in StreamTask implementa…

pnowojski 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_r284568587
 
 

 ##########
 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:
   I'm worried about the possible performance degradation caused by moving the `while (true)` loop to the outside level and adding one more virtual call. @sunhaibotb was reporting that this is causing performance degradations. 
   
   Before merging this, can we measure this? Maybe this is visible in `benchmarkCount` or we could write a micro benchmark for the `StreamTask` or `OneInputStreamTask`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services