give task_scheduler the small object optimization
#1955
+139
−110
Merged