>
> ready_fd = epoll_wait()
>
> ready_core_id = fd_array[ready_fd];
>
> Instead of
>
> ready_fd = epoll_wait()
>
> foreach(core in cores)
>     if core.monitoring_fd == ready_fd
>         ready_core_id = core.id
>         break
>     end
> end
>
> In your case you will lose about 320K of memory (40000*4*4) but you will
> not need to scan all the array.
>


Attached there is a patch to use the fd array to upgrade the async
"search_for_fd" from O(n) to O(1)

Please report your results

Thanks a lot for your support in async stack

-- 
Roberto De Ioris
http://unbit.it

Attachment: better_async.patch
Description: Binary data

_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to