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

Conversation

2 participants
@gitlost
Contributor

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 wp-cli/committers Oct 13, 2017

@danielbachhuber danielbachhuber added this to the 1.2.3 milestone Oct 13, 2017

@danielbachhuber danielbachhuber merged commit 16e42ed into master Oct 13, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the append_next branch Oct 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment