Use fastjson for faster serialization and deserialization #154
jdgriffith
started this conversation in
Ideas
Replies: 1 comment
-
This is certainly possible, but most users of this library aren't too concerned with the (slower) performance of Gson (de)serialization compared to other libraries. Some OpenAPI Java generators use Jackson instead of Gson which may yield some performance improvements, but odds are that there are other performance bottlenecks in one's trading system that show up before JSON (de)serialization. Alpaca isn't meant for HFT as well. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm curious if there is any consideration for other JSON libraries since the amount of messages and subscriptions you can have with market data can be a firehose.
Here is a benchmark project: https://github.com/fabienrenaud/java-json-benchmark?tab=readme-ov-file
I realize you have to take some benchmarks with some nuance, but I think it's a good heuristic. I opted for fastjson when I was using polygon market data so I could process all the incoming trades as quickly as possible. I was generating my own per second aggregates from trades.
I'm interested to hear other's thoughts and if by chance this is a concern for others.
Beta Was this translation helpful? Give feedback.
All reactions