Skip to content
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

refactor(pdk): output content with string.buffer #11937

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

chronolaw
Copy link
Contributor

@chronolaw chronolaw commented Nov 7, 2023

Summary

Use string.buffer to replace slow table.concat.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Full changelog

  • [Implement ...]

Issue reference

Fix #[issue number]

@chobits
Copy link
Contributor

chobits commented Nov 7, 2023

hi @chronolaw need one performance test result, maybe a simple and informal test like some loops on both of these two implementation (wrap them into some test function), otherwise it looks ok

@chronolaw
Copy link
Contributor Author

Aapo did some tests about string.buffer and table.concat. Please refer to it. #11304 (comment)

Copy link
Contributor

@chobits chobits left a comment

Choose a reason for hiding this comment

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

Approve, I have checked the refactoring logic, confirm it works as expected

@chobits
Copy link
Contributor

chobits commented Nov 7, 2023

Aapo did some tests about string.buffer and table.concat. Please refer to it. #11304 (comment)

Pretty cool. I think the later reviewing for similar PR like refactoring table.concat with string.buffer will be easier.

@bungle bungle merged commit ae5d5ea into master Nov 7, 2023
34 checks passed
@bungle bungle deleted the refactor/string_buffer_in_service_request branch November 7, 2023 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants