Review 12.4 Merged

79710[TASK] Add shared cache for VariableProcessor

Oliver Hader CR +2 V +2 Normal +90 −17 updated 07/04/23, 21:29

Commit message

VariableProcessor::addHash() is called to convert URI path
variables that don't comply with certain rules to a hash,
which does.

First of all, variables must not exceed a certain length
of 32, second of all, variables must only contain word
characters aka "\w" or "[A-Za-z0-9_]".

So whenever a variable is too long or contains invalid
characters, it is converted to an md5 hash which complies
with both rules.

It has been reported that the checks, whether to generate a
hash and the hashing would have a very noticable performance
impact.

This change introduces as specific runtime cache for
VariableProcessor that is shared with any other new instance.
This way, the necessity whether a hash is required and the hash
representation of a value can be resolved from this cache.

For instance, this would speed up scenarios that are enerating
large product lists and generate, when every invocation with a
new UID would have triggered a new hash check and assignment.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
  • Verified V +2 Done
    • Oliver Hader +2
    • core-ci +1 CI

Issues 1

Files 5

Review log 34

  1. Oliver Hader uploaded patch set 1 07/04/23, 21:18

  2. core-ci voted on patch set 1 V +1 07/04/23, 21:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/43444

  3. Oliver Hader voted on patch set 1 V +2 CR +2 07/04/23, 21:29

  4. Oliver Hader merged patch set 2 07/04/23, 21:29