Skip to content

Commit ab981f1

Browse files
turboFeisrowen
authored andcommitted
[SPARK-29857][WEB UI] Defer render the spark UI dataTables
### What changes were proposed in this pull request? This PR support defer render the spark UI page. ### Why are the changes needed? When there are many items, such as tasks and application lists, the renderer of dataTables is heavy, we can enable deferRender to optimize it. See details in https://datatables.net/examples/ajax/defer_render.html ### Does this PR introduce any user-facing change? No. ### How was this patch tested? Not needed. Closes apache#26482 from turboFei/SPARK-29857-defer-render. Authored-by: turbofei <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent b095232 commit ab981f1

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

core/src/main/resources/org/apache/spark/ui/static/executorspage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ $(document).ready(function () {
462462
{"visible": false, "targets": 5},
463463
{"visible": false, "targets": 6},
464464
{"visible": false, "targets": 9}
465-
]
465+
],
466+
"deferRender": true
466467
};
467468

468469
execDataTable = $(selector).DataTable(conf);

core/src/main/resources/org/apache/spark/ui/static/historypage.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ $(document).ready(function() {
177177
{name: 'eventLog'},
178178
],
179179
"autoWidth": false,
180+
"deferRender": true
180181
};
181182

182183
if (hasMultipleAttempts) {

core/src/main/resources/org/apache/spark/ui/static/stagepage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,8 @@ $(document).ready(function () {
880880
{ "visible": false, "targets": 16 },
881881
{ "visible": false, "targets": 17 },
882882
{ "visible": false, "targets": 18 }
883-
]
883+
],
884+
"deferRender": true
884885
};
885886
taskTableSelector = $(taskTable).DataTable(taskConf);
886887
$('#active-tasks-table_filter input').unbind();

0 commit comments

Comments
 (0)