You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Kay Ousterhout (JIRA)" <ji...@apache.org> on 2014/11/06 09:09:33 UTC

[jira] [Created] (SPARK-4266) Avoid $$ JavaScript for StagePages with huge numbers of tables

Kay Ousterhout created SPARK-4266:
-------------------------------------

             Summary: Avoid $$ JavaScript for StagePages with huge numbers of tables
                 Key: SPARK-4266
                 URL: https://issues.apache.org/jira/browse/SPARK-4266
             Project: Spark
          Issue Type: Bug
          Components: Web UI
            Reporter: Kay Ousterhout


Some of the new javascript added to handle hiding metrics significantly slows the page load for stages with a lot of tasks (e.g., for a job with 10K tasks, it took over a minute for the page to finish loading in Chrome on my laptop).  There are at least two issues here:

(1) The new table striping java script is much slower than the old CSS.  The fancier javascript is only needed for the stage summary table, so we should change the task table back to using CSS so that it doesn't slow the page load for jobs with lots of tasks.

(2) The javascript associated with hiding metrics is expensive when jobs have lots of tasks, I think because the jQuery selectors have to traverse a much larger DOM.   The ID selectors are much more efficient, so we should consider switching to these, and/or avoiding this code in additional-metrics.js:

    $("input:checkbox:not(:checked)").each(function() {
        var column = "table ." + $(this).attr("name");
        $(column).hide();
    });

by initially hiding the data when we generate the page in the render function instead, which should be easy to do.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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