preprocessQuery uses a preg_replace_callback that loops needlessly considering the logic of the regex. This callback is run only if at least one match is found, and the match we're after will always be in the last position.

Submitting a patch to eliminate a for loop and (potentially thousands of) count() calls.

CommentFileSizeAuthor
#1 sqlsrv-eliminate-looping-1992208-1.patch1.05 KBrymo

Comments

rymo’s picture

Status: Active » Needs review
StatusFileSize
new1.05 KB

patch.

david_garcia’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes

Commited to experimental D8 version of the driver.

At least the change does not break D8 setup.

If the change proofs to be stable, we can then backport.

  • 26d5f59 committed on
    Issue #1992208: optimize replaceReservedCallback.
    
david_garcia’s picture

Status: Needs review » Closed (fixed)

Backported to latest 7.x dev.

david_garcia’s picture

Backported to latest 7.x dev.