Skip to content

Reduce the toCharArray overhead #3812

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

Closed

Conversation

mdeinum
Copy link
Contributor

@mdeinum mdeinum commented Dec 2, 2020

Both the PatternMatcher and JdbcParameterUtils use String.toCharArray for
processing. This will create a new char[] which needs to be collected. The
same code has been rewritten to use String.charAt to reduce the overhead.

Additionally unneeded object creation in the PatternMatcher has been removed
as well, to reduce further objects needed to be gc'ed.

Both the PatternMatcher and JdbcParameterUtils use String.toCharArray for
processing. This will create a new char[] which needs to be collected. The
same code has been rewritten to use String.charAt to reduce the overhead.

Additionally unneeded object creation in the PatternMatcher has been removed
as well, to reduce further objects needed to be gc'ed.
@fmbenhassine fmbenhassine added this to the 5.0.0-M1 milestone Jan 14, 2021
@fmbenhassine fmbenhassine added has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" in: infrastructure and removed in: core labels Jan 14, 2021
@fmbenhassine fmbenhassine modified the milestones: 5.0.0-M1, 4.3.2 Jan 21, 2021
@fmbenhassine fmbenhassine added for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line and removed has: backports Legacy label from JIRA. Superseded by "for: backport-to-x.x.x" labels Jan 21, 2021
@fmbenhassine
Copy link
Contributor

LGTM. Rebased and merged as 11bac7c. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-4.2.x Issues that will be back-ported to the 4.2.x line in: infrastructure pr-for: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants