Make the trashcan smarter when deleting items
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)
Type: |
defect → enhancement
|
Priority: |
minor → trivial
|
Milestone: |
→ BASE 2.x+
|
Version: |
→ trunk
|
Milestone: |
BASE 2.x+ → BASE 2.4
|
Milestone: |
BASE 2.4 → BASE 2.3
|
Description: |
modified (diff)
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
Milestone BASE 2.4 deleted