Skip to content

Keep strings before incomplete escape sequences in partial mode #208

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

Merged
merged 1 commit into from
Jul 14, 2025

Conversation

dittos
Copy link
Contributor

@dittos dittos commented Jul 12, 2025

Fixes #207

Copy link

codecov bot commented Jul 12, 2025

Codecov Report

Attention: Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/jiter/src/string_decoder.rs 87.50% 0 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link

codspeed-hq bot commented Jul 12, 2025

CodSpeed Performance Report

Merging #208 will improve performances by 41.26%

Comparing dittos:partial-escape (ba4012a) with main (e6b28c2)

Summary

⚡ 19 improvements
✅ 51 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
big_jiter_iter 36.9 ms 27.4 ms +34.53%
floats_array_jiter_iter 184.7 µs 157.8 µs +17.08%
medium_response_jiter_skip 16.9 µs 15.3 µs +10.6%
pass2_jiter_iter 6.7 µs 4.8 µs +39.19%
pass2_jiter_skip 2.2 µs 1.9 µs +15.63%
sentence_jiter_skip 2.2 µs 1.7 µs +24.66%
sentence_serde_value 8.9 µs 8 µs +11.61%
string_array_jiter_iter 7.9 µs 5.7 µs +38.53%
true_array_jiter_iter 4.5 µs 3.7 µs +23.98%
true_object_jiter_iter 22 µs 19.8 µs +11.1%
true_object_jiter_skip 13.1 µs 11.5 µs +13.28%
unicode_jiter_iter 8.5 µs 7.7 µs +10.24%
unicode_jiter_skip 2.3 µs 1.9 µs +22.59%
unicode_serde_value 9.6 µs 8.6 µs +11.06%
x100_jiter_iter 1.3 µs 1.1 µs +23.74%
x100_jiter_skip 1,241.9 ns 879.2 ns +41.26%
x100_jiter_value 1.7 µs 1.4 µs +17.86%
x100_serde_iter 2.9 µs 2.3 µs +27.78%
python_parse_massive_ints_array 1.3 ms 1.2 ms +11.66%

Copy link
Collaborator

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@davidhewitt davidhewitt merged commit a05dc81 into pydantic:main Jul 14, 2025
25 checks passed
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.

trailing-strings partial mode: incomplete string ending with \ disappears
2 participants