Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

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

Merged
yirutang merged 4 commits into
googleapis:mainfrom
snuyanzin:BigQuerySchemaUtil
Jan 2, 2024
Merged

fix: Do not use regexp for BigQuerySchemaUtil#isProtoCompatible#2226
yirutang merged 4 commits into
googleapis:mainfrom
snuyanzin:BigQuerySchemaUtil

Conversation

@snuyanzin

@snuyanzin snuyanzin commented Aug 9, 2023

Copy link
Copy Markdown
Contributor

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 review from a team and farhan0102 August 9, 2023 22:27
@google-cla

google-cla Bot commented Aug 9, 2023

Copy link
Copy Markdown

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>
@snuyanzin snuyanzin force-pushed the BigQuerySchemaUtil branch from 31ff74c to d8acd18 Compare August 9, 2023 22:30
@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 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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.

3 participants