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

Lessen context duplication in db search. #55

Merged
merged 2 commits into from
Oct 13, 2017
Merged

Conversation

gitlost
Copy link
Contributor

@gitlost gitlost commented Oct 12, 2017

Related issue #54 and PRs wp-cli/search-replace-command#35 and wp-cli/php-cli-tools#123

Lessens context duplication in db search by shortening and appending context if it overlaps with the next match.

This duplicates the loop logic in search-replace --log by using a $last_offset, which improves output and performance.

Also adds the re-check of encoding per value done in that PR so as not to mistakenly detect all legacy-encoded input as ASCII if the first value happens to be that.

Also exercises the safe_substr() fix more by adding test to search with large data.

@gitlost gitlost requested a review from a team October 13, 2017 00:24
@danielbachhuber danielbachhuber added this to the 1.2.3 milestone Oct 13, 2017
@danielbachhuber danielbachhuber merged commit 16e42ed into master Oct 13, 2017
@danielbachhuber danielbachhuber deleted the append_next branch October 13, 2017 12:49
danielbachhuber added a commit that referenced this pull request Nov 18, 2022
Lessen context duplication in db search.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants