Skip to content

Optimize Element.remove_child

Erwan Rouchet requested to merge optimize-remove-child into master

Requires !1406 (merged)

While spending a lot of time updating all the SQL assertions, I noticed Element.remove_child made a lot of unnecessary queries and loaded unnecessary columns and models. I made some quick changes that should avoid loading child element UUIDs in RAM and avoid making one SQL query for each child element. There is definitely room for more improvement should we ever switch to full-SQL path manipulation methods, but this is a quick win.

Edited by Erwan Rouchet

Merge request reports

Loading