Skip to content
Unverified Commit d5bf2c45 authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

Move normalizePath to regexes instead of looping



This is IMO a bit more readable and it seems to make the code faster.
Tested it on the company instance where there are over 3k calls to this
function. It shaves off around 10ms.

The advantage here is that the pattern gets optimized by php itsel and
cached.
Also looking for all patterns at the same time and especially no longer
looping for /./ patterns should save time.

Signed-off-by: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent 1dbd7172
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment