You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
...
The text was updated successfully, but these errors were encountered:
deleteContainer*
(Template) methods every time check template references causing loop in loop but EVERY template will be deleted so checking references makes no sensegetContainer*
models methods causesenrich*
methods while onlyid*
used. Better use daoget(Tag|Trigger|Variable)
,checkIsValid*
use loops to find template. See Import: optimize validation loops to dictionary #532accessValidator->checkUseCustomTemplatesCapability
applied only toidSite
but not for each template so it could be cached for loopsRequest::processRequest
causes too much duplicate and unnecessary logic such asaccessValidator->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 #533getSupportedComparisons
output never changes therefore should be cached as it causes 24*n translations.checkIsValidComparison
could also use dictionary (array) instead of loopvalidateValues
,formatParameters
methods in models to be public to bypass duplicate*Provider->checkIsValid*
isNameInUse
unnecessary queries...
The text was updated successfully, but these errors were encountered: