You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ss...@apache.org on 2013/07/26 19:52:09 UTC

[2/2] git commit: Removed unneeded mapping of ID -> executor

Removed unneeded mapping of ID -> executor

`framework.executors` and `framework.completed_executors` were arrays
that were converted into maps of ID -> executor, and then the template
called `_.values` to use just the values, i.e. the original executor
arrays, to sort the table.

Stick with the original arrays and save lots of allocation.

Review: http://reviews.apache.org/r/12833


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7d108f76
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7d108f76
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7d108f76

Branch: refs/heads/master
Commit: 7d108f7675cb831b4a27bcd85c4a823efc96923a
Parents: fbf6339
Author: Ross Allen <re...@gmail.com>
Authored: Sat Jul 20 01:57:44 2013 -0700
Committer: Ross Allen <re...@gmail.com>
Committed: Fri Jul 26 10:51:58 2013 -0700

----------------------------------------------------------------------
 src/webui/master/static/js/controllers.js    | 6 ------
 src/webui/master/static/slave_framework.html | 4 ++--
 2 files changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7d108f76/src/webui/master/static/js/controllers.js
----------------------------------------------------------------------
diff --git a/src/webui/master/static/js/controllers.js b/src/webui/master/static/js/controllers.js
index d47f29b..84012de 100644
--- a/src/webui/master/static/js/controllers.js
+++ b/src/webui/master/static/js/controllers.js
@@ -587,12 +587,6 @@
           return;
         }
 
-        // Construct maps of the executors.
-        $scope.framework.executors = _.object(
-            _.pluck($scope.framework.executors, 'id'), $scope.framework.executors);
-        $scope.framework.completed_executors = _.object(
-            _.pluck($scope.framework.completed_executors, 'id'), $scope.framework.completed_executors);
-
         // Compute the framework stats.
         $scope.framework.num_tasks = 0;
         $scope.framework.cpus = 0;

http://git-wip-us.apache.org/repos/asf/mesos/blob/7d108f76/src/webui/master/static/slave_framework.html
----------------------------------------------------------------------
diff --git a/src/webui/master/static/slave_framework.html b/src/webui/master/static/slave_framework.html
index 0df5c04..63eb5c4 100644
--- a/src/webui/master/static/slave_framework.html
+++ b/src/webui/master/static/slave_framework.html
@@ -108,7 +108,7 @@
       </thead>
 
       <tbody>
-        <tr ng-repeat="executor in _.values(framework.executors) | orderBy:tables['executors'].selected_column:tables['executors'].reverse">
+        <tr ng-repeat="executor in framework.executors | orderBy:tables['executors'].selected_column:tables['executors'].reverse">
           <td>
             <a href="{{'#/slaves/' + slave_id + '/frameworks/' + framework.id + '/executors/' + executor.id}}">
               {{executor.id}}
@@ -156,7 +156,7 @@
       </thead>
 
       <tbody>
-        <tr ng-repeat="completed_executor in _.values(framework.completed_executors) | orderBy:tables['completed_executors'].selected_column:tables['completed_executors'].reverse">
+        <tr ng-repeat="completed_executor in framework.completed_executors | orderBy:tables['completed_executors'].selected_column:tables['completed_executors'].reverse">
           <td>
             <a href="{{'#/slaves/' + slave_id + '/frameworks/' + framework.id + '/executors/' + completed_executor.id}}">
               {{completed_executor.id}}