Skip to content

types: speedup error generation to improve performance#64271

Merged
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
GMHDBJD:speedUpDecimal
Nov 7, 2025
Merged

types: speedup error generation to improve performance#64271
ti-chi-bot[bot] merged 1 commit intopingcap:masterfrom
GMHDBJD:speedUpDecimal

Conversation

@GMHDBJD
Copy link
Copy Markdown
Collaborator

@GMHDBJD GMHDBJD commented Nov 4, 2025

What problem does this PR solve?

Issue Number: close #64270

Problem Summary:

What changed and how does it work?

  • change GenWithStackByArgs to FastGenByArgs

before this pr
image
after this pr
image
See toddstoffel/analytics_benchmark#5 for more details.

Check List

Tests

  • Unit test
    orignal test covert it.
    require.Truef(t, terror.ErrorEqual(types.ErrTruncatedWrongVal, lastWarn.Err), "err %v", lastWarn.Err)
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

@ti-chi-bot ti-chi-bot Bot added release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 4, 2025
@tiprow
Copy link
Copy Markdown

tiprow Bot commented Nov 4, 2025

Hi @GMHDBJD. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

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.

Copy link
Copy Markdown
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-chi-bot ti-chi-bot Bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 4, 2025
@Benjamin2037 Benjamin2037 added needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Nov 4, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.7785%. Comparing base (71c61b9) to head (6c1beaa).
⚠️ Report is 18 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #64271        +/-   ##
================================================
+ Coverage   72.7412%   73.7785%   +1.0373%     
================================================
  Files          1859       1862         +3     
  Lines        503989     509484      +5495     
================================================
+ Hits         366608     375890      +9282     
+ Misses       115120     111559      -3561     
+ Partials      22261      22035       -226     
Flag Coverage Δ
integration 42.1333% <100.0000%> (?)
unit 72.9329% <100.0000%> (+0.6253%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.8700% <ø> (+0.1132%) ⬆️
parser ∅ <ø> (∅)
br 47.3216% <ø> (+0.9235%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@D3Hunter D3Hunter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please paste the performance test result too

@lance6716
Copy link
Copy Markdown
Contributor

Seems types package mixes GenWithStackByArgs and FastGenByArgs. Maybe open an issue to totally switch to FastGenByArgs?

@GMHDBJD
Copy link
Copy Markdown
Collaborator Author

GMHDBJD commented Nov 6, 2025

Seems types package mixes GenWithStackByArgs and FastGenByArgs. Maybe open an issue to totally switch to FastGenByArgs?

create a enhancement #64315

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Nov 6, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, D3Hunter

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [Benjamin2037,D3Hunter]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 6, 2025
@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot Bot commented Nov 6, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-11-04 13:23:34.34378721 +0000 UTC m=+190063.786817079: ☑️ agreed by Benjamin2037.
  • 2025-11-06 09:32:51.35082028 +0000 UTC m=+349020.793850149: ☑️ agreed by D3Hunter.

@hawkingrei
Copy link
Copy Markdown
Member

/retest

1 similar comment
@joechenrh
Copy link
Copy Markdown
Contributor

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Nov 7, 2025

@joechenrh: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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.

@joechenrh
Copy link
Copy Markdown
Contributor

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Nov 7, 2025

@joechenrh: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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.

@GMHDBJD
Copy link
Copy Markdown
Collaborator Author

GMHDBJD commented Nov 7, 2025

/retest

@tiprow
Copy link
Copy Markdown

tiprow Bot commented Nov 7, 2025

@GMHDBJD: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

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.

@ti-chi-bot ti-chi-bot Bot merged commit 659850d into pingcap:master Nov 7, 2025
29 checks passed
@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.1: #64334.

@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #64335.

@ti-chi-bot
Copy link
Copy Markdown
Member

In response to a cherrypick label: new pull request created to branch release-7.5: #64336.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-cherry-pick-release-7.5 Should cherry pick this PR to release-7.5 branch. needs-cherry-pick-release-8.1 Should cherry pick this PR to release-8.1 branch. needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

types: speed up decimal error generation to improve performance

7 participants