On 02.01.2012 15:50, Henrik Sperre Johansen wrote:
On 02.01.2012 14:45, Igor Stasenko wrote:
On 2 January 2012 10:42, Lukas Renggli<[email protected]> wrote:
6. It wraps each announcement delivery into a curtailed block. It does
that even for those that are never actually announced.
yeah, this can be optimized
With subs parameter a sequenceable collection, it could be made nearly
non-existant by iterating manually rather than through do:, moving
ifCurtailed to the outer scope. (resuming from index rather than a
copy after failed delivery).
Code would be uglier though.
By "nearly non-existant", I meant you pay the overhead once per delivery
rather than once per subscriber.
It's still an overhead when you have a large number of deliveries to a
few subscribers.
5. It iterates over all announcements, it doesn't even try to group
announcements of the same kind.
it is pointless to group them, and makes no real difference.
Forgot to comment this, I partly agree with both really.
Of course it is not pointless to group them, algorithmically speaking.
Is the scale at which it matters a usual occurance? Don't think so.
Do you fix your announcement lookup by doing so? Yes.
Is that necessarily a bad thing? I'm not sure.
IIRC, it was one of the discussions Igor "won" (plus, it was simpler to
mess about with) :)
Cheers,
Henry