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

Optimized stripping of tabs and newlines in GraphQL (micro-optimization) #18563

Merged
merged 1 commit into from
Jul 10, 2021

Conversation

pintarj
Copy link
Contributor

@pintarj pintarj commented Jul 9, 2021

The current implementation of the stripNewlinesAndTabs() method compiles 2 regular-expressions ("\n" and "\t") each time that the method is invoked and then performs 2 matchings.

The optimized version compiles the regular-expression only once when the class is loaded and performs only one mathiching on method invocation.

@quarkus-bot
Copy link

quarkus-bot bot commented Jul 9, 2021

Thanks for your pull request!

The title of your pull request does not follow our editorial rules. Could you have a look?

  • title should preferably start with an uppercase character (if it makes sense!)

This message is automatically generated by a bot.

@pintarj pintarj changed the title optimized stripping of tabs and newlines in GraphQL (micro-optimization) Optimized stripping of tabs and newlines in GraphQL (micro-optimization) Jul 9, 2021
Copy link
Member

@phillip-kruger phillip-kruger left a comment

Choose a reason for hiding this comment

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

Lgtm

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

That's much better, thanks.

@gsmet gsmet merged commit 7aa1aff into quarkusio:main Jul 10, 2021
@quarkus-bot quarkus-bot bot added this to the 2.1 - main milestone Jul 10, 2021
@gsmet gsmet modified the milestones: 2.1 - main, 2.0.2.Final Jul 12, 2021
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.

None yet

3 participants