96538[TASK] Improve redirect matching performance for many redirects
Commit message
Test this change
Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch
- Check out patch set 5
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/38/96538/5 && git checkout FETCH_HEAD - Cherry-pick onto main
-
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/38/96538/5 && git cherry-pick FETCH_HEAD
Review
-
Code review CR +1 Needs a vote
- Georg Ringer +1
-
Verified V +1 Needs a vote
- Georg Ringer +1
- core-ci +1 CI
Merge conflicts 4
Issues 1
Files 8
- typo3/sysext/core/Documentation/Changelog/15.0/Important-90143-MatchPlainRedirectsViaDatabaseQuery.rstnew+49 −0
- typo3/sysext/redirects/Classes/Cache/BloomFilter.php2new+109 −0
- typo3/sysext/redirects/Classes/Service/RedirectCacheService.php+187 −29
- typo3/sysext/redirects/Classes/Service/RedirectService.php2+19 −21
- typo3/sysext/redirects/Tests/Functional/Service/Fixtures/RedirectService_matchRedirect.csvnew+39 −0
- typo3/sysext/redirects/Tests/Functional/Service/RedirectServiceMatchRedirectTest.phpnew+237 −0
- typo3/sysext/redirects/Tests/Unit/Cache/BloomFilterTest.phpnew+110 −0
- typo3/sysext/redirects/Tests/Unit/Service/RedirectServiceTest.php+0 −440
Review log 1116
-
Benni Mack uploaded patch set 1 10/08/26, 17:22
-
Benni Mack updated the commit message in patch set 2 10/08/26, 17:28
-
core-ci voted on patch set 1 V +1 10/08/26, 17:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110520
-
core-ci voted on patch set 2 V +1 10/08/26, 17:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110521
-
Benni Mack uploaded patch set 3
V +110/16/26, 09:48 -
Benni Mack marked it ready for review 10/16/26, 09:49
-
core-ci voted on patch set 3 V -1 10/16/26, 10:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111345
-
Benni Mack uploaded patch set 4
V -110/16/26, 14:45 -
core-ci voted on patch set 4 V +1 10/16/26, 14:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111369
-
Markus Klein commented on patch set 4 10/20/26, 15:34
Nice one. Still need to review a bit moreRedirectService.php:308ParameterType::INTEGER -
Daniel Windloff commented on patch set 4 10/25/26, 09:01
Very nice improvement.BloomFilter.php:101I think `xxh3` could be better here. It's faster, and if I compare the false positive rate for a bloom filter with 10^5 entries and 10^7 not matching test cases, the false positive rate seems to be a little bit lower on average. I'm not totally sure, as I never implemented a bloom filter in php, but I assume `unpack` `V2` matches better with `xxh3` and is not so good with `xxh128`. -
Benni Mack commented on patch set 4 10/30/26, 21:35
RedirectService.php:308ReplyLet's change this separately please, if we want this. Current core: 17 x ParameterType::INTEGER 857 x Connection::PARAM_INT -
Benni Mack uploaded patch set 5
V +110/30/26, 21:54 -
Benni Mack commented on patch set 5 10/30/26, 21:59
BloomFilter.php:101ReplyThanks! I did a quick test: 100k keys, 2M non-matching lookups, 3 runs each. False positive rates were 1.00–1.01 % for both xxh128 and xxh3, at the same speed (~0.47 µs per lookup); This was just done locally on my laptop. But no measurable difference, but since unpack('V2') only uses 64 bits anyway, your suggestion is better. -
core-ci voted on patch set 5 V +1 10/30/26, 22:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/112919
-
Georg Ringer voted on patch set 5 CR +1 V +1 11/20/26, 20:02