[interfacekit] Re: BSession(NG)

Adi Oanca <adioanca@xxxxxxxxx> wrote:
>       A BWindow/BView message is short, from 12 bytes long to... around 
> of 
> 400-500 for the biggest ones. Of course there will be larger messages 
> when sending a "gunned" :-) region or something that I can't think of 
> at 
> this moment. Because there is no reason making a port call with a 
> message only 12 bytes long we write into our buffer until it fills 
> up, 
> then flush and start writing from the start of the buffer. Note that 
> when the buffer flushes a BWindow/BView message may not be complete a 
> part of it being found in the next port message. This happens because 
> we 
> use a fixed buffer for write_port calls.
>       This is how Be did it, this is how BSession works. But apparently 
> some 
> of us don't like the way it works...
>       We had no problems with it until now, and I didn't heard anybody 
> complaining about this under BeOS R5.

That's exactly what I am talking about: the big messages; for the 
smaller messages, it makes a lot of sense to put them together in one 
port write. For very big regions, it might be beneficial to use areas 
to transfer the data (as Ingo proposed) - since you know these things 
before assembling the message, it should be pretty easy to do so.

Anyway, if the code is in place now, I wouldn't change it *now* but 
experiment at a later point. For the most stuff, optimization should 
come last.
If we'll find out (as Adi suggests) that we won't have to complain 
anyway, then we might as well wait and see what happens.

Bye,
   Axel.


Other related posts: