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

replace Jackson to Gson #740

Merged
merged 1 commit into from
Oct 10, 2021
Merged

replace Jackson to Gson #740

merged 1 commit into from
Oct 10, 2021

Conversation

zhicwu
Copy link
Contributor

@zhicwu zhicwu commented Oct 10, 2021

Replace Jackson with Gson for below reasons:

  • Gson is smaller and faster
  • JPMS support starts with JDK 9 but Jackson requires JDK 11
    Now the shaded JDBC driver jar file is ~2.5MB, while in 0.3.1 it's ~3.7MB.

Some more changes:

  • removed class ru.yandex.clickhouse.util.apache.StringUtils
  • replaced Jackson with Gson and removed below classes:
    • ru.yandex.clickhouse.Jackson -> use com.clickhouse.client.data.JsonStreamUtils instead
    • ru.yandex.clickhouse.response.ArrayToStringDeserializer

@github-actions
Copy link

Benchmark                           (client)  (connection)  (statement)   Mode  Cnt    Score     Error  Units
Basic.insertOneRandomNumber  clickhouse-jdbc         reuse       normal  thrpt   20  267.668 ±  33.428  ops/s
Basic.insertOneRandomNumber  clickhouse-jdbc         reuse     prepared  thrpt   20  269.233 ±  34.156  ops/s
Basic.insertOneRandomNumber  clickhouse-jdbc           new       normal  thrpt   20  268.239 ±  39.659  ops/s
Basic.insertOneRandomNumber  clickhouse-jdbc           new     prepared  thrpt   20  268.737 ±  27.469  ops/s
Basic.selectOneRandomNumber  clickhouse-jdbc         reuse       normal  thrpt   20  888.627 ±  92.238  ops/s
Basic.selectOneRandomNumber  clickhouse-jdbc         reuse     prepared  thrpt   20  903.096 ±  95.256  ops/s
Basic.selectOneRandomNumber  clickhouse-jdbc           new       normal  thrpt   20  853.087 ± 129.386  ops/s
Basic.selectOneRandomNumber  clickhouse-jdbc           new     prepared  thrpt   20  877.444 ± 125.358  ops/s

@zhicwu zhicwu merged commit 668713a into ClickHouse:develop Oct 10, 2021
@zhicwu zhicwu deleted the jackson-to-gson branch October 10, 2021 04:52
@zhicwu zhicwu linked an issue Oct 10, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Supporting JPMS
1 participant