Skip to content

Use executeBlocking to execute blocking method asynchronously#60

Closed
Arooba-git wants to merge 1 commit into
eclipse-vertx:masterfrom
Arooba-git:fix-blocking-calls
Closed

Use executeBlocking to execute blocking method asynchronously#60
Arooba-git wants to merge 1 commit into
eclipse-vertx:masterfrom
Arooba-git:fix-blocking-calls

Conversation

@Arooba-git

@Arooba-git Arooba-git commented Jul 10, 2023

Copy link
Copy Markdown

Hi! :)
Apparently the code inside deployVerticle callback is blocking.. This PR fixes the blocking calls to keep the pipeline reactive.

Performance (latency) before fix
Screen Shot 2023-07-10 at 10 14 07 AM

Performance after fix
Screen Shot 2023-07-10 at 7 34 26 PM

@Arooba-git Arooba-git force-pushed the fix-blocking-calls branch from 8f2011d to 9602322 Compare July 10, 2023 03:30
@vietj

vietj commented Jul 10, 2023

Copy link
Copy Markdown
Member

can you sign the eclipse contributor agreement ?

@Arooba-git

Arooba-git commented Jul 10, 2023

Copy link
Copy Markdown
Author

@vietj Hello!
As you can see in the screenshot, I already have :)
Screen Shot 2023-07-10 at 5 38 33 PM

Screen Shot 2023-07-10 at 5 41 33 PM

@Arooba-git Arooba-git force-pushed the fix-blocking-calls branch from 9602322 to fb13909 Compare July 10, 2023 11:01
@tsegismont

Copy link
Copy Markdown
Member

I fail to see how the screenshots (annotations on main thread state) relate to the updated test code (callback executed on an event loop thread).

This portion of test code looks harmless so I'm closing the issue.

@tsegismont tsegismont closed this Jul 18, 2023
@Arooba-git

Copy link
Copy Markdown
Author

@tsegismont Hello!
The snapshots show that before the fix (with the blocking code), the main thread is being wasted just waiting or in parking state. After the fix, we can see the waiting/parking time reduced and the main thread being utilized usefully (green) :)

@tsegismont

Copy link
Copy Markdown
Member

Hi @Arooba-git

I can see there is a difference between the two screenshots for the main thread. But it is not related to the changed code because it runs on an event loop thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants