Speedup destruction of sheets with too many listeners & broadcasters.
authorJan Holesovsky <kendy@collabora.com>
Sat, 21 Dec 2013 00:41:18 +0000 (01:41 +0100)
committerMichael Meeks <michael.meeks@collabora.com>
Sat, 28 Dec 2013 16:18:42 +0000 (16:18 +0000)
commit5d96a8af9f1c90d7a9a5ff29a8294bc185e2aa9c
treeed4c15648db51657d988bc6c42daa011c0b79c0d
parented62683f83b086f2f3bfeef6548b0546a031bf85
Speedup destruction of sheets with too many listeners & broadcasters.

Listeners and broadcasters are M:N relationship.  If you want to
destruct them, you easily end up in O(M*N) situation; where for every
listener, you iterate all broadcasters, to remove that one listener.

To avoid that, announce to the broadcasters that they are going to die, and the
listeners do not have to bother with removing themselves from the broadcaster.
The broadcaster will not broadcast anything after the PrepareForDesctruction()
call anyway.

Change-Id: I68d78b23e73bcbb944de9139448b2c20dfa14f62
include/svl/broadcast.hxx
sc/inc/column.hxx
sc/source/core/data/column2.cxx
sc/source/core/data/table1.cxx
svl/source/notify/broadcast.cxx