Skip to content

I20171027-2000

@trancexpress trancexpress tagged this 18 Oct 20:43
When deleting a package with a few thousand sub-packages, a check during
removal takes up to several minutes. This cannot be cancelled by
canceling the delete operation.

This check is done in DeleteModifications.postProcess. The method
iterates over all packages that are to be removed. For each of those
packages, the method will retrieve all sub-packages. For each of those
sub-packages, it checks whether that sub-package is to be removed. This
last check is on an array container. In total, this results in cubic
complexity.

With this change the algorithm which checks whether it can remove a
package completely has linear complexity, instead of quadratic. The
total complexity for deleting the packages is therefore quadratic,
instead of cubic. The check for a few thousand sub-packages then takes a
few seconds instead of minutes.

Change-Id: I097d58bdeaa650f06b38a1ee7bf38bdbc5a21127
Signed-off-by: Simeon Andreev <simeon.danailov.andreev@gmail.com>
Assets 2
Loading