Fix hardcoded epoll timeout values
engine.c : 460, 580, 552 => Default epoll timeout was hardcoded to 1 instead of #define constant net-events.c : 414 => timeout argument was not being used, A hardcoded 1 was passed to epull_fetch_events instead.
Fixes this issue : https://github.com/TelegramMessenger/MTProxy/issues/100
I honestly have no idea how this fix works, and I did not get deep into mtproto codebase, but I applied these changes manually to trunk and mtproto load went down from 10% to ~1%.
Maintainers should really consider merging this pull request. Because before these changes mtproto took 5-10% without any clients.
Can confirm, applying this patch decreased the idle CPU load from 3-4% to less than 1%. Without any apparent degradation in responsiveness or quality during active use (for now).