Skip to content

Speed up escaped byte buf parsing#534

Merged
juntyr merged 1 commit into
ron-rs:masterfrom
juntyr:faster-escaped-byte-buf
Apr 10, 2024
Merged

Speed up escaped byte buf parsing#534
juntyr merged 1 commit into
ron-rs:masterfrom
juntyr:faster-escaped-byte-buf

Conversation

@juntyr

@juntyr juntyr commented Apr 9, 2024

Copy link
Copy Markdown
Member

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 force-pushed the faster-escaped-byte-buf branch from 1bdb8de to 1769934 Compare April 9, 2024 05:53
@juntyr juntyr self-assigned this Apr 9, 2024
@juntyr juntyr requested a review from torkleyy April 9, 2024 05:54
@codecov-commenter

Copy link
Copy Markdown

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

juntyr commented Apr 9, 2024

Copy link
Copy Markdown
Member Author

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
@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.

3 participants