Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: decrease consumer async server wait and sleep #833

Merged
merged 2 commits into from
Aug 11, 2022

Conversation

jyeshe
Copy link
Member

@jyeshe jyeshe commented Aug 9, 2022

Decreases the number of soft real time preemption on AsyncStoreServer by delegating the signaling of async task done.

@jyeshe jyeshe self-assigned this Aug 9, 2022
@jyeshe jyeshe force-pushed the async-set-done branch 2 times, most recently from 76475da to 6b6539b Compare August 9, 2022 16:18
block_index = {567_891, 2}
call_txi = 12_345_680

account_pk = :crypto.strong_rand_bytes(32)
amount = Enum.random(1_000_000_000..9_999_999_999)
balances = %{{:address, account_pk} => amount}

Aex9BalancesCache.put(ct_pk, block_index, @next_hash, balances)
ct_pks =
Enum.map(1..100, fn _i ->
Copy link
Member Author

@jyeshe jyeshe Aug 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Locally with 16 threads can process 30x more within same time. There will be a PR to optimize it though by not calculating the hash within the task.

@jyeshe jyeshe changed the title fix: decrease consumer async server wait and sleep refactor: decrease consumer async server wait and sleep Aug 9, 2022
Base automatically changed from producer-dequeue-timeout to master August 11, 2022 07:50
@jyeshe jyeshe merged commit a34ff73 into master Aug 11, 2022
@jyeshe jyeshe deleted the async-set-done branch August 11, 2022 07:51
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