Optimize worker's codes