Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
I ran the Fair Scheduler's core scheduling loop through a profiler tool and identified a bunch of minimally invasive changes that can shave off a few milliseconds.
The main one is demoting a couple INFO log messages to DEBUG, which brought my benchmark down from 16000 ms to 6000.
A few others (which had way less of an impact) were
- Most of the time in comparisons was being spent in Math.signum. I switched this to direct ifs and elses and it halved the percent of time spent in comparisons.
- I removed some unnecessary instantiations of Resource objects
- I made it so that queues' usage wasn't calculated from the applications up each time getResourceUsage was called.