Opened 10 years ago

Closed 10 years ago

#1917 closed enhancement (fixed)

Improve performance of AnnotationSet.deleteEmptyAnnotationSets()

Reported by: Nicklas Nordborg Owned by: everyone
Priority: major Milestone: BASE 3.4.1
Component: core Version:
Keywords: Cc:

Description

This method is intended to remove annotation sets that are no longer in use. Eg. all annotations in it have been removed and it no longer inherit annotations from other annotation sets.

The problem is that the algorithm used can take a lot of time. On my test system it just spent about 40 minutes to remove 5 annotation sets.

The system currently has about 250K annotations and 50K annotation sets which is apparently creating queries that take very long time.

Change History (1)

comment:1 by Nicklas Nordborg, 10 years ago

Resolution: fixed
Status: newclosed

(In [6716]) Fixes #1917: Improve performance of AnnotationSet.deleteEmptyAnnotationSets()

Changed the approach to finding empty annotation sets. Instead of using a main query with a set of subquires an initial query with a single left join is used. This gives us a list of potentially empty annotation sets. This list is then further narrowed down by executing additional queries (that also take the parameter limitation findings from #1914 into account). What remains in the list is then used for deleting.

The new implementation runs in less than a second on the same data set that previously took 40 minutes!

Note: See TracTickets for help on using tickets.