hiredis icon indicating copy to clipboard operation
hiredis copied to clipboard

uv adapter: reduce number of uv_poll_start calls

Open noxiouz opened this issue 3 years ago • 1 comments

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 [email protected]

noxiouz avatar Jan 03 '21 18:01 noxiouz

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 avatar Jan 08 '21 22:01 michael-grunder

Closing in favor of rebased #1098

michael-grunder avatar Sep 01 '22 19:09 michael-grunder