Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Perf] remove \Wvision\Bundle\DataDefinitionsBundle\Interpreter\AssetUrlInterpreter::deduplicateAsset fuzzy #402

Open
dkarlovi opened this issue Nov 1, 2023 · 1 comment

Comments

@dkarlovi
Copy link
Collaborator

dkarlovi commented Nov 1, 2023

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Branch? master

Fuzzy as used currently doesn't scale well, with a lot of assets in a asset-heavy import it can take a second and it can get executed hundreds of times. Much better is to have a simple lookup by single value, the issue is the value can be an array (multiple URLs match the same asset).

We could support say up to 5 URLs and then do

(name = 'url1' and data = $value) OR (name = 'url2' and data = $value)...

It's not pretty, but should be much faster, without us needing to migrate the data structure to say JSON or something.

@dkarlovi
Copy link
Collaborator Author

We did this change inline on a project and the improvement is substantial, went from 200ms queries to 5ms queries.

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

No branches or pull requests

1 participant