[Perf] remove \Wvision\Bundle\DataDefinitionsBundle\Interpreter\AssetUrlInterpreter::deduplicateAsset fuzzy
dkarlovi opened this issue · 1 comments
dkarlovi commented
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 commented
We did this change inline on a project and the improvement is substantial, went from 200ms queries to 5ms queries.