Optimizing Gson deserialization

后端 未结 5 905
野的像风
野的像风 2021-02-04 08:39

What is the best way to optimize deserialization?

I am currently using the standard Gson.toJson and Gson.fromJson methods for serialization and deserialization of some c

5条回答
  •  悲哀的现实
    2021-02-04 09:09

    There is no way to improve the Gson library serialization and deserialization time.

    As Programmer Bruce said, if the execution time really matters to you, take a look at the Jackson library. It is, in my opinion, a little bit more "complicated" to use but it has been proven much faster than any other json libraries in benchmarks.

    Here are some best practices to improve performances with Jackson.

提交回复
热议问题