This is an automated email from the ASF dual-hosted git repository. yao pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new ac70daf7337 [SPARK-45565][UI] Unnecessary JSON.stringify and JSON.parse loop for task list on stage detail ac70daf7337 is described below commit ac70daf7337324d38742034c1d6afc2f0243b600 Author: Kent Yao <y...@apache.org> AuthorDate: Tue Oct 17 18:17:31 2023 +0800 [SPARK-45565][UI] Unnecessary JSON.stringify and JSON.parse loop for task list on stage detail ### What changes were proposed in this pull request? `dataSrc` returns a json value, we don't need to stringify it and parse it back ### Why are the changes needed? performance improvements for UI rendering ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? build and verify the stage page locally ### Was this patch authored or co-authored using generative AI tooling? no Closes #43392 from yaooqinn/SPARK-45565. Authored-by: Kent Yao <y...@apache.org> Signed-off-by: Kent Yao <y...@apache.org> --- core/src/main/resources/org/apache/spark/ui/static/stagepage.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/src/main/resources/org/apache/spark/ui/static/stagepage.js b/core/src/main/resources/org/apache/spark/ui/static/stagepage.js index ad3eca06a0c..4b6b7e219e1 100644 --- a/core/src/main/resources/org/apache/spark/ui/static/stagepage.js +++ b/core/src/main/resources/org/apache/spark/ui/static/stagepage.js @@ -841,11 +841,7 @@ $(document).ready(function () { data.length = totalTasksToShow; } }, - "dataSrc": function (jsons) { - var jsonStr = JSON.stringify(jsons); - var tasksToShow = JSON.parse(jsonStr); - return tasksToShow.aaData; - }, + "dataSrc": (jsons) => jsons.aaData, "error": function (_ignored_jqXHR, _ignored_textStatus, _ignored_errorThrown) { alert("Unable to connect to the server. Looks like the Spark " + "application must have ended. Please Switch to the history UI."); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org