Uh oh!
There was an error while loading. Please reload this page.
Update TaskLogContent to support virtualized rendering - #50746
Conversation
jscheffl
commented
May 18, 2025
Cool! I feel not confident to review but very great improvement! |
guan404ming
commented
May 18, 2025
Thanks! I'm still trying to figure out how to test virtualized list. |
aritra24
commented
May 18, 2025
Nice change! Good job! |
Uh oh!
There was an error while loading. Please reload this page.
3e1bc49 to
2a9eb7bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bbovenzi
commented
May 28, 2025
Looks good overall. Just one nit. And then, I wonder if we want this in 3.0.2 instead of 3.1.0? Its an enhancement, not a new feature. |
I think it should go into 3.0.2 since it doesn’t affect how users interact with the component. I’d consider it more of an enhancement for ux. Imo the new feature would be the upcoming ndjson-related changes after #49470 |
guan404ming
commented
May 29, 2025
Thanks! |
jason810496
commented
Jun 1, 2025
Big thanks @guan404ming 🙌 That's a fantastic improvement, really appreciate your work on this! |
…50746) (#51202) * Fix OpenAPI schema for `get_log` API (#50547) * Fix openapi schema for get_log API * Fix test_log (cherry picked from commit 08cc57d) * [v3-0-test] Update `TaskLogContent` to support virtualized rendering (#50746) * Update TaskLogContent to support virtualized rendering * Update TaskLogPreview and Logs to handle undefined parsedLogs (cherry picked from commit 813f3e3) Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com> --------- Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com> Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
…50746) (#51202) * Fix OpenAPI schema for `get_log` API (#50547) * Fix openapi schema for get_log API * Fix test_log (cherry picked from commit 08cc57d) * [v3-0-test] Update `TaskLogContent` to support virtualized rendering (#50746) * Update TaskLogContent to support virtualized rendering * Update TaskLogPreview and Logs to handle undefined parsedLogs (cherry picked from commit 813f3e3) Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com> --------- Co-authored-by: LIU ZHE YOU <68415893+jason810496@users.noreply.github.com> Co-authored-by: Guan Ming(Wesley) Chiu <105915352+guan404ming@users.noreply.github.com>
* Update TaskLogContent to support virtualized rendering * Update TaskLogPreview and Logs to handle undefined parsedLogs
* Update TaskLogContent to support virtualized rendering * Update TaskLogPreview and Logs to handle undefined parsedLogs


Related Issue
#50333
cc @bbovenzi@pierrejeambrun
Why
The log rendering would be quite slow or even crash browser when rendering large logs on the frontend
How
By using @tanstack/react-virtual to support virtualized rendering, I mostly follow this official example to implement. I choose to use dynamic rendering instead of specifying fixed height since our log would have different height.
--> about 7x speed up (for 10000 logs on my local machine and tested 10 times)
Calculated from the moment the browser logs the parsed logs to the console until it’s finally rendered on the screen. Although this isn’t perfectly precise, it still gives a simple metric to confirm that our speed-up trend is positive.
before -> avg 7s
Screen.Recording.2025-05-18.at.3.38.53.PM.mov
after -> avg 1s
Screen.Recording.2025-05-18.at.3.37.58.PM.mov
Minor change: add
acceptfield foruseLog, which make us to supportndjsoneasily by changing the field value and adding parse func for it after it is fully supported in the future.^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.