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?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080115/4c700aeb/attachment.pgp>

Reply via email to