-
Notifications
You must be signed in to change notification settings - Fork 33
feat(KONFLUX-5817): paginate the ecResults to improve performance #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #159 +/- ##
==========================================
+ Coverage 80.64% 80.70% +0.06%
==========================================
Files 556 555 -1
Lines 21654 21666 +12
Branches 5126 5125 -1
==========================================
+ Hits 17462 17485 +23
+ Misses 4167 4156 -11
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
const extractedLogs = logs.match(/(\[report-json\] ).+/g); | ||
const json = JSON.parse(extractedLogs.map((l) => l.replace('[report-json] ', '')).join('')); | ||
return json; | ||
const EC_REPORT_JSON_REGEX = /((?<=step-report-json\s*:-\s*)(\{.*?\})(?=\s*step-|$))/g; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes of utils is duplicated with #84. :-). We can focus on changes of the component.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@testcara We should be using virtualized table instead of paginated table here. The default <Table>
Component we use for every list page supports virtualization.
// We add pagination support here to avoid large ecResult. | ||
// When one application has more than 100 components, the size of ecResult is more than | ||
// 23M and the length of records is more than 50000. The browser cannot show it in one page. | ||
// More, we cannot enjoy the shared virtualized table for inconsisitent parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sahil143 , i have tried the visualized table when enjoyed by pipelinerun and others but failed for inconsistent parameters. would you like to double-confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by inconsistent parameters here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The visualized table is supporting the infinite scroll scenarios like the pipelineruns and other lists.
For this log parts, it does not match that scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would try to enjoy the visualized table, thank you for pointing it out. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we close this PR in favor of #200
Fixes
KONFLUX-5817
Description
When the application has more than 100 components, the size of ecResult would be larger than 23M and its length of records is larger than 4000, then UI crashes. The patch would paginate the ecResults to ensure UI can handle it well.
Besides above improvement, the patch also decrease the time of the component render to ensure just when ecResult really changes, pages would be rendered.
FYI. I would create PR for hac-dev after the patch is merged.
Type of change
Screen shots / Gifs for design review
security for pipelinerun and taskrun:

Screen.Recording.2025-03-18.at.13.03.14.mov
How to test or reproduce?
Browser conformance: