spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayousterhout <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4266] [Web-UI] Reduce stage page load t...
Date Mon, 24 Nov 2014 22:23:39 GMT
Github user kayousterhout commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3328#discussion_r20827509
  
    --- Diff: core/src/main/resources/org/apache/spark/ui/static/table.js ---
    @@ -15,16 +15,18 @@
      * limitations under the License.
      */
     
    -/* Adds background colors to stripe table rows. This is necessary (instead of using css
or the
    - * table striping provided by bootstrap) to appropriately stripe tables with hidden rows.
*/
    -function stripeTables() {
    -    $("table.table-striped-custom").each(function() {
    -        $(this).find("tr:not(:hidden)").each(function (index) {
    -           if (index % 2 == 1) {
    -             $(this).css("background-color", "#f9f9f9");
    -           } else {
    -             $(this).css("background-color", "#ffffff");
    -           }
    -        });
    +/* Adds background colors to stripe table rows in the summary table (on the stage page).
This is
    + * necessary (instead of using css or the table striping provided by bootstrap) because
the summary
    + * table has hidden rows.
    + *
    + * An ID selector (rather than a class selector) is used to ensure this runs quickly
even on pages
    + * with thousands of task rows (ID selectors are much faster than class selectors). */
    +function stripeSummaryTable() {
    +    $("#task-summary-table").find("tr:not(:hidden)").each(function (index) {
    --- End diff --
    
    This is a table that has at most 6 or 7 rows (it's the summary table for each metric)
-- so I don't think that level of optimization matters (the most important thing here is the
ID selector, so you don't need to traverse the task table, which can have infinitely many
rows)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message