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

Speed up escaped byte buf parsing #534

Merged
merged 1 commit into from Apr 10, 2024

Conversation

juntyr
Copy link
Member

@juntyr juntyr commented Apr 9, 2024

The fuzzer times out when parsing a 100k long unicode string because checking for escaped strings is slow. This PR makes two small changes to speed this case up by ~ x3

  • when skipping byte strings in the struct type test, don't recheck for base64-encoded strings
  • use single-char matchers instead of closure based ones for finding '"' and '\\'

* [ ] I've included my change in CHANGELOG.md

@juntyr juntyr self-assigned this Apr 9, 2024
@juntyr juntyr requested a review from torkleyy April 9, 2024 05:54
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (e8ca8c5) to head (1769934).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##            master     #534      +/-   ##
===========================================
- Coverage   100.00%   99.39%   -0.61%     
===========================================
  Files           85       85              
  Lines        14658    14271     -387     
===========================================
- Hits         14658    14184     -474     
- Misses           0       87      +87     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@juntyr
Copy link
Member Author

juntyr commented Apr 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.39%. Comparing base (e8ca8c5) to head (1769934).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.

The codecov regression seems unrelated and mostly occurs in derives and test macros - it should be handled separately

@juntyr juntyr merged commit 08c691d into ron-rs:master Apr 10, 2024
9 checks passed
@juntyr juntyr deleted the faster-escaped-byte-buf branch April 10, 2024 14:17
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.

None yet

3 participants