Description
Currently StreamThread.runloop() uses a simple round-robin scheduler, where a single request is taken from each task for processing, followed by poll, followed by the same process over again. For example, for an app that has just 2 tasks each with 3 records ready to be processed we'd have the following sequence
poll() -> process 1 request for task T1 -> process 1 request for task T2 -> poll()
-> process 1 request for task T1 -> process 1 request for task T2 -> poll()
-> process 1 request for task T1 -> process 1 request for task T2 -> poll()
This is quite inefficient. Instead, a better round robin scheduler would do:
poll() -> process all 3 requests for task T1 -> process all 3 requests for task T2 -> poll()
Attachments
Issue Links
- links to