Forum OpenACS Development: Faster move for cr_items?

Collapse
Posted by Nathan Lunt on
I am attempting to make deletes for large volumes of files work faster for users.  The way I've attempted to do this is by creating a cr_trash_root folder, then when a user deletes, it creates a subfolder under this one in which to move all the items, then redirects the user back to the parent folder before starting a delete.  The idea being, that since all I was doing was updating a parent_id, the action should seem instant to the user.

This is not the case, however, because cr_items has a trigger, cr_items_tree_update_tr, which goes through and recalculates the tree_sortkeys,  Accordingly, it seems that a move ends up being slower than a delete for a high volume of files (in this test case, about 1500 files).

Is there any way to improve the performance of a move for this use case?