Yicong-Huang commented on code in PR #3660:
URL: https://github.com/apache/texera/pull/3660#discussion_r2299588834


##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostBasedScheduleGenerator.scala:
##########
@@ -606,8 +610,8 @@ class CostBasedScheduleGenerator(
       .map(level =>
         level
           .map(region => {
-            val (resourceConfig, regionCost) =
-              costEstimator.allocateResourcesAndEstimateCost(region, 1)
+            val (resourceConfig, regionCost) = costEstimatorMemoization
+              .getOrElseUpdate(region, 
costEstimator.allocateResourcesAndEstimateCost(region, 1))

Review Comment:
   Do we really need the entire region as the key? That's a lot of information.



##########
core/amber/src/main/scala/edu/uci/ics/amber/engine/architecture/scheduling/CostBasedScheduleGenerator.scala:
##########
@@ -606,8 +610,8 @@ class CostBasedScheduleGenerator(
       .map(level =>
         level
           .map(region => {
-            val (resourceConfig, regionCost) =
-              costEstimator.allocateResourcesAndEstimateCost(region, 1)
+            val (resourceConfig, regionCost) = costEstimatorMemoization

Review Comment:
   When do we clean this cache?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to