tag-manager icon indicating copy to clipboard operation
tag-manager copied to clipboard

Import is too slow

Open ulcuber opened this issue 3 years ago • 0 comments

  • [x] https://github.com/matomo-org/tag-manager/pull/520
  • [ ] https://github.com/matomo-org/tag-manager/pull/521
  • [ ] https://github.com/matomo-org/tag-manager/pull/522
  • [ ] deleteContainer* (Template) methods every time check template references causing loop in loop but EVERY template will be deleted so checking references makes no sense
  • [ ] getContainer* models methods causes enrich* methods while only id* used. Better use dao
  • [ ] the best for deletion would be mass deletion to prevent n+1 queries
  • [ ] providers methods get(Tag|Trigger|Variable), checkIsValid* use loops to find template. See #532
  • [ ] accessValidator->checkUseCustomTemplatesCapability applied only to idSite but not for each template so it could be cached for loops
  • [ ] Request::processRequest causes too much duplicate and unnecessary logic such as accessValidator->checkWriteCapability, containers->checkContainerExists, accessValidator->checkUseCustomTemplatesCapability that already checked in parent controller and sanitizing-unsanitizing parameters. Maybe better use models as they contain necessary validation. #533
  • [ ] Comparison getSupportedComparisons output never changes therefore should be cached as it causes 24*n translations. checkIsValidComparison could also use dictionary (array) instead of loop
  • [ ] it would be useful to have validateValues, formatParameters methods in models to be public to bypass duplicate *Provider->checkIsValid*
  • [ ] TriggerIds validator could check all triggers once to prevent n+1 queries
  • [ ] Since import uses clean version duplicate template names should be checked in Import loop using dictionary (array) to prevent all isNameInUse unnecessary queries ...

ulcuber avatar Jul 27 '22 09:07 ulcuber