-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
table: memoize TableCommon.getCols #53605
Conversation
Hi @ekexium. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: ekexium <[email protected]>
pkg/table/tables/tables.go
Outdated
|
||
// avoid duplicated calculations of Cols | ||
// mode -> cols | ||
getColsCache [][]*table.Column |
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.
Maybe we could use hiddenColumns
, visibleColumns
and publicColumns
instead of this one.
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.
When are these fields supposed to be set (before this PR)? I don't find anywhere initializing them
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.
Seems never be setted. /cc @zimulala
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.
Seems #50062 introduced the regression. It removed the default initialization, but mistakenly making them never initialized.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #53605 +/- ##
================================================
+ Coverage 72.4222% 74.8076% +2.3854%
================================================
Files 1505 1507 +2
Lines 430553 438363 +7810
================================================
+ Hits 311816 327929 +16113
+ Misses 99427 90324 -9103
- Partials 19310 20110 +800
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
Test failed because |
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
/retest |
@ekexium: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Defined2014, zimulala The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/retest |
@ekexium: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What problem does this PR solve?
Issue Number: close #53604
Problem Summary:
getCols
does duplicated calculation, which wastes CPU time.What changed and how does it work?
Memoize this function.
Proportion of time in the microbenchmark of AddRecord (with pipelined DML and ART memdb)
Previous:
This PR:
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.