Skip to content

Use raw SQL in Element.add_parent when the element already has an existing parent

Erwan Rouchet requested to merge add-second-parent-sql into master

Closes #1287 (closed)

Benchmarked using an element that has a parent, and has the most children of my whole database: this folder from GoLFor-DEEPN with 1016548 element paths.

With master, using the Link to another parent option on the selection from the frontend takes 20 minutes. The RQ worker uses 4GB of RAM, and PostgreSQL takes 8GB of RAM.

With this branch, it takes 7 minutes, RQ uses 140MB of RAM (very close to what it uses when idle), and PostgreSQL 160MB of RAM (very close to idle too). The SELECT part takes 9 seconds, everything else is spent just writing to the disk.

Edited by Erwan Rouchet

Merge request reports

Loading