You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above result.get() will eventually delegate to CompletableFuture.get(). I checked the implementation provided in JDK 8, it will first spin-waiting for the countdown of 256 (the eighth power of 2) and then park the thread. I believe it's the unnecessary spin that caused the bad performance.
When running under JDK 11, the performance performs well as the previous versions, I still does not check the difference between these two implementations yet.
dubbo/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AsyncToSyncInvoker.java
Line 54 in 501e4db
The above
result.get()
will eventually delegate to CompletableFuture.get(). I checked the implementation provided in JDK 8, it will first spin-waiting for the countdown of 256 (the eighth power of 2) and then park the thread. I believe it's the unnecessary spin that caused the bad performance.When running under JDK 11, the performance performs well as the previous versions, I still does not check the difference between these two implementations yet.
Thank @Jeff-Lv for help finding this issue.
The text was updated successfully, but these errors were encountered: