Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-4266

Avoid expensive JavaScript for StagePages with huge numbers of tasks

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: Web UI
    • Labels:
      None
    • Target Version/s:

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              kayousterhout Kay Ousterhout
              Reporter:
              kayousterhout Kay Ousterhout
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: