Skip to content

Skip keys that are not meant to be references - #1

Merged
NickSdot merged 1 commit into
NickSdot:improve-performancefrom
kohlerdominik:improve-performance-fix
Dec 9, 2024
Merged

NickSdot merged 1 commit into
NickSdot:improve-performancefrom
kohlerdominik:improve-performance-fix

Conversation

@kohlerdominik

Copy link
Copy Markdown

Hi @NickSdot

you pinged me in cebe#156 (comment). I know, it has been a while since then, but the urge to dive into the topic again wasn't that big, to be honest.

Once again I'm now at the good old problem that we can't update the package, so I'll give it another try. I tried your suggested performance fix, and it works 🎉. Well done!

I found this little bug, though, that resolveRelativeUri() is called also on values that are not meant to be URIs. I guess this was unintentionally introduced when trying to DRY the code by combining

$oContextUri = $oContext->getUri();
$resolvedUri = $context->resolveRelativeUri($value);

before

if ($key === '$ref') { ... }
if ($key === 'externalValue') { ... }

So this PR fixes that

@NickSdot

NickSdot commented Dec 9, 2024

Copy link
Copy Markdown
Owner

Good catch, thank you! 🎉

@NickSdot
NickSdot merged commit 83b12ee into NickSdot:improve-performance Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants