WordPress.org

Make WordPress Core

Changes between Version 3 and Version 4 of Ticket #50244, comment 10


Ignore:
Timestamp:
06/10/2020 02:09:29 PM (2 months ago)
Author:
zieladam
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #50244, comment 10

    v3 v4  
    1111> In pre validation mode, validation will happen twice. Once when we check every request for passing validation, and then again in the individual dispatch. Adjusting this to only happen once makes me nervous, but there would be a performance benefit to it only happening once.
    1212
    13 The only thing that could go wrong there is something unexpected happening between the batch validation and the handler invocation, e.g. requesting a batch of two requests, both trying to insert a row with the same value that's subject to an UNIQUE constraint - I think core should protect developers from doing that, but offer an option to opt out of this protection when more performance is required. Maybe by splitting pre-validation into two modes like `validation=pre` and `validation=pre-only`?
     13The only thing that could go wrong there is something unexpected happening between the batch validation and the handler invocation, e.g. requesting a batch of two requests, both trying to insert a row with the same value that's subject to an UNIQUE constraint - I think core should protect developers from doing that, but offer an option to opt out of this protection when more performance is required. Maybe by having two pre-validation modes like `validation=pre-and-individual` and `validation=pre-only`?
    1414
    1515> I've omitted support for GET requests entirely at the moment.