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

Import is too slow #523

Open
1 of 13 tasks
ulcuber opened this issue Jul 27, 2022 · 0 comments
Open
1 of 13 tasks

Import is too slow #523

ulcuber opened this issue Jul 27, 2022 · 0 comments

Comments

@ulcuber
Copy link
Contributor

ulcuber commented Jul 27, 2022

  • Optimize BaseContext variableToArray #520
  • Optional check template name in use #521
  • Mass delete templates in container version #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 Import: optimize validation loops to dictionary #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. Optimize import: use models instead of emulating requests in loop #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
    ...
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