Opened 18 years ago

Closed 17 years ago

#252 closed enhancement (fixed)

Make the trashcan smarter when deleting items

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: trivial Milestone: BASE 2.4
Component: web Version: trunk
Keywords: Cc:

Description (last modified by Jari Häkkinen)

The trashcan now try to delete all items in one go, which means that it has to check if an item is in use or not. This check may require many queries to the database and if there are many linked item in the trashcan this process is timeconsuming. The worst case is that each iteration only deletes one item. Then the isUsed method is called for the other items many times.

A smarter approach would be to delete items in an order that is less likely to result in items beeing used when it is their time to be deleted. Ie. we should delete extracts before deleting samples, experiments before raw bioassays, etc. The worst case above could suddenly be turned into a best case where the isUsed method is only called once for every item.

See also ticket:577

Change History (8)

comment:1 by Nicklas Nordborg, 18 years ago

Type: defectenhancement

comment:2 by Nicklas Nordborg, 18 years ago

Priority: minortrivial

comment:3 by Jari Häkkinen, 18 years ago

Milestone: BASE 2.x+
Version: trunk

comment:4 by Jari Häkkinen, 17 years ago

Milestone: BASE 2.x+BASE 2.4

comment:5 by Jari Häkkinen, 17 years ago

Milestone: BASE 2.4BASE 2.3

Milestone BASE 2.4 deleted

comment:6 by Jari Häkkinen, 17 years ago

Description: modified (diff)

comment:7 by Nicklas Nordborg, 17 years ago

Status: newassigned

comment:8 by Nicklas Nordborg, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [3526]) Fixes #252: Make the trashcan smarter when deleting items

Note: See TracTickets for help on using tickets.