Skip to content

Conversation

@mark-b2c2
Copy link

@mark-b2c2 mark-b2c2 commented Jan 19, 2025

Hey @zapov,

I was profiling an app of ours using your fantastic serialization library and I saw that deserializing quoted doubles was causing excessive creation of strings due to the code falling back to Double.parseDouble in parseDoubleGeneric.

Please take a look at this PR and advise if this approach looks reasonable and what else you think needs completing in order to consider merging the change.

@zapov
Copy link
Member

zapov commented Jan 29, 2025

Thanks for the PR.
Before merging I would like to see more tests, to cover various formats of double + this special cases of Infinity and NaN.
Plus would want to see some error handling, eg what if one writes Infinity without quotes, has 3 quotes instead of 2 and other edge cases which were previously covered by quoting.

@mark-b2c2
Copy link
Author

Thanks for the feedback. I wanted to see if you were agreeable to the change to begin with.

I will improve test coverage in the next couple of days and revert when complete.

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.

2 participants