Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Reviewed
Description
Each call of FairShareComparator creates a new Resource object "one":
Resource one = Resources.createResource(1);
At the volume of 1000 nodes and 1000 apps, the comparator will be called more than 10 million times per second, thus creating more than 10 million object "one", which is unnecessary.
Since the object "one" is read-only and is never referenced outside of comparator, we could make it static.