-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
PoParser PERF #15943
Merged
Merged
PoParser PERF #15943
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4904dca
PoParser PERF
hishamco 8c22e2e
Fix the unit tests
hishamco c35f50a
Merge branch 'main' into hishamco/poparser-perf
hishamco fbd7707
Merge branch 'main' into hishamco/poparser-perf
hishamco b4bb275
Merge branch 'main' into hishamco/poparser-perf
hishamco c684e2c
Merge branch 'main' into hishamco/poparser-perf
hishamco bc043e2
Fix the build
hishamco 2270907
Merge branch 'main' into hishamco/poparser-perf
hishamco 612f311
Merge branch 'main' into hishamco/poparser-perf
hishamco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just check for
\
in the input string. (IndexOf is fast, it's vectorized). If not return the string. Otherwise create the ZString, check the other usages in Orchard, it needs to be disposed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we need to check? BTW the disposing in my mind after the tests pass
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that you check that the
builder
is initialized in lots of places, to prevent initializing it if there is nothing to unescape.My suggestion is to first check if there is anything to encode, by looking for
\
in the whole string first. If there is not you return, if there is then you create the builder and don't check anymore.Looking for
\
is very fast as I explained.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already did that two weeks ago but the few tests were broken, I found the issue and fix it