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
Proposed feature
DB connections are rare and should be used with care. There are many places in the code where redundant calls are being made. For instance, typeORM's save makes actually two requests: Checking first if the entity exists and then either inserts or updates. And before that we often call findOne which is redundant at this point. We should use insert or update instead of save. Listeners and subscribers are not triggered without using save, but I don't think we use these features. However, double check if the modifiedAt / insertedAt fields still work without save.
Additional investigation: Also, it would be interesting to see how we can improve the current update logic of nodes: I guess when moving around a whole branch of x nodes, x requests with updates are triggered? Can this be improved?
The text was updated successfully, but these errors were encountered:
Proposed feature
DB connections are rare and should be used with care. There are many places in the code where redundant calls are being made. For instance, typeORM's
save
makes actually two requests: Checking first if the entity exists and then either inserts or updates. And before that we often callfindOne
which is redundant at this point. We should useinsert
orupdate
instead ofsave
. Listeners and subscribers are not triggered without using save, but I don't think we use these features. However, double check if the modifiedAt / insertedAt fields still work without save.Additional investigation: Also, it would be interesting to see how we can improve the current update logic of nodes: I guess when moving around a whole branch of x nodes, x requests with updates are triggered? Can this be improved?
The text was updated successfully, but these errors were encountered: