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

Fix allocations in bytes_len_cmp #672

Merged
merged 1 commit into from
Sep 6, 2024
Merged

Conversation

HeadHunter483
Copy link
Collaborator

@HeadHunter483 HeadHunter483 commented Sep 6, 2024

Description

Replaces encoding object or array json node to counting bytes length recursively.

There can be a slight divergence in case when field names have escaping \" since it will be considered as one symbol instead of two because of to process object fields insaneJSON AsField is called and it always escapes field names. But there is a huge advantage in memory consumption in this fix and such difference is negligible.

Also there might be divergence when byte_len is computed after string field was unescaped in some action plugin and it should be considered when using this comparison condition.

Fixes #671

@goshansmails goshansmails self-requested a review September 6, 2024 09:06
@HeadHunter483 HeadHunter483 merged commit e21ef33 into master Sep 6, 2024
8 checks passed
@HeadHunter483 HeadHunter483 deleted the 671-fix-byte-len-cmp branch September 6, 2024 13:21
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.

Bug: Fix allocations in byte_len_cmp when node is object or array
3 participants