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

uv adapter: reduce number of uv_poll_start calls #908

Closed
wants to merge 2 commits into from

Conversation

noxiouz
Copy link

@noxiouz noxiouz commented Jan 3, 2021

Internally uv_poll_start iterates over all attached event handlers to update event mask.
It's quite expensive operation if there many event handlers attached
to a loop

As redisLibuvEvents.events is a copy of what libuv should see,
we can rely on it to avoid event mask updates.

For example, in async.c#L662 there is a high chance that fd is already being listened for writable events

Signed-off-by: Anton Tiurin noxiouz@yandex.ru

Internally uv_poll_start iterates over all
attached event handlers to update event mask. It's
quite expensive operation if there many event handlers attached
to a loop.
As redisLibuvEvents.events is a copy of what libuv should see,
we can rely on it to avoid event mask updates.

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
@michael-grunder
Copy link
Collaborator

Hi @noxiouz sorry for the delay getting to this but I've been busy on another project.

I'll try to get this tested/merged this weekend.

@michael-grunder michael-grunder self-assigned this Jan 12, 2021
@michael-grunder
Copy link
Collaborator

Closing in favor of rebased #1098

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.

2 participants