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

fix: Do not use regexp for BigQuerySchemaUtil#isProtoCompatible #2226

Merged
merged 4 commits into from Jan 2, 2024

Conversation

snuyanzin
Copy link
Contributor

@snuyanzin snuyanzin commented Aug 9, 2023

The issue with BigQuerySchemaUtil#isProtoCompatible it is appearing in profiler with intensive usage of JsonStreamWriter#append
So the idea is to not use regexp

some measurements with jmh

Benchmark                                     Mode  Cnt       Score       Error   Units
BigQuerySchemaUtilTest.isProtoCompatible     thrpt   10   12607.187 ±    68.760  ops/ms
BigQuerySchemaUtilTest.isProtoCompatibleNew  thrpt   10  174518.753 ± 21791.930  ops/ms

new way is faster
please let me know if I miss anything

@snuyanzin snuyanzin requested a review from a team as a code owner August 9, 2023 22:27
@google-cla
Copy link

google-cla bot commented Aug 9, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. labels Aug 9, 2023
Signed-off-by: Sergey Nuyanzin <snuyanzin@gmail.com>
@yirutang yirutang added the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 31, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Oct 31, 2023
@gcf-owl-bot gcf-owl-bot bot requested a review from a team as a code owner October 31, 2023 03:31
@yirutang yirutang changed the title Do not use regexp for BigQuerySchemaUtil#isProtoCompatible feat: Do not use regexp for BigQuerySchemaUtil#isProtoCompatible Jan 2, 2024
@yirutang yirutang changed the title feat: Do not use regexp for BigQuerySchemaUtil#isProtoCompatible fix: Do not use regexp for BigQuerySchemaUtil#isProtoCompatible Jan 2, 2024
@yirutang yirutang added owlbot:run Add this label to trigger the Owlbot post processor. kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Jan 2, 2024
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jan 2, 2024
@yirutang yirutang added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2024
@yirutang yirutang added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 2, 2024
@yirutang yirutang merged commit 1741166 into googleapis:main Jan 2, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants