iotex-core icon indicating copy to clipboard operation
iotex-core copied to clipboard

refactor: use strings.Builder to improve performance

Open liuyueyangxmu opened this issue 1 month ago • 2 comments

Description

strings.Builder has fewer memory allocations and better performance. More info: golang/go#75190

Fixes #(issue)

Type of change

  • [x] Code refactor or improvement

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • [x] make test
  • [] fullsync
  • [] Other test (please specify)

Test Configuration:

  • Firmware version:
  • Hardware:
  • Toolchain:
  • SDK:

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [] I have commented my code, particularly in hard-to-understand areas
  • [] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [] I have added tests that prove my fix is effective or that my feature works
  • [] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules

liuyueyangxmu avatar Nov 26 '25 09:11 liuyueyangxmu

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 26 '25 09:11 CLAassistant

Quality Gate Failed Quality Gate failed

Failed conditions
34.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

sonarqubecloud[bot] avatar Nov 26 '25 09:11 sonarqubecloud[bot]

@CoderZhi Hi, Would you mind review this PR at your convenience? Thank you very much.

liuyueyangxmu avatar Dec 16 '25 08:12 liuyueyangxmu