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

JSON serialization performance #133

Closed
yifanmai opened this issue May 3, 2023 · 2 comments
Closed

JSON serialization performance #133

yifanmai opened this issue May 3, 2023 · 2 comments

Comments

@yifanmai
Copy link

yifanmai commented May 3, 2023

dataclasses_json could be a performance bottleneck. dataclasses_json is reflection-based (like Dacite), which is an order of magnitude slower than codegen-based approaches (like cattrs).

See:

@dlwh
Copy link
Member

dlwh commented May 3, 2023

Good to know. I kind of doubt it'll matter here? I only use it for metadata for the caches. The metadata is like 500B per chunk, 3-10K per cache, and roughly a similar amount per shard. Even with Python as slow as it is, I'd hope this isn't a big deal?

@yifanmai
Copy link
Author

yifanmai commented May 3, 2023

Yeah actually I think we can ignore this because it's not on the performance critical path. I got confused as to where JSON is used.

@yifanmai yifanmai closed this as completed May 3, 2023
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

No branches or pull requests

2 participants