On Tuesday 15 January 2008 16:31, Robert Hailey wrote: > > On Jan 12, 2008, at 3:30 PM, Matthew Toseland wrote: > > Probably better to have separate queues, maybe an array of queues. > > So long as the priority is strict that would make it faster to enqueue > items, but not dequeue. In this implementation they are already lined > up in send order. In fact, I think that it would be a much better > optimization to only remove 'x' bytes from the send queue:
If the queue gets big the linear search we do when adding will get slow. > > public MessageItem[] grabQueuedMessageItems(long > oneMessageMoreThanThisBytes); > > That would also remove (or help?) the rather odd race condition of > packets requeued while the transmitter is holding all the packets. Not sure I understand this - why would we remove less than a full packet's worth?
pgpUj74v3dkzM.pgp
Description: PGP signature
_______________________________________________ Devl mailing list [email protected] http://emu.freenetproject.org/cgi-bin/mailman/listinfo/devl
