[interfacekit] Re: BSession(NG)


Hi Axel!


Axel Dörfler wrote:
Also, never split the message into two port calls.
No. I'm sorry, I will never agree with you on this one!

Can you elaborate a bit on why you don't do that?
Doing 2 port writes of 1024 should be slower than doing 1 write of 2048, no matter if you need to allocate the memory (or part of it) first - and the problem should get worse the more parts the message will have.
I don't understand you.

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.



Hope it helps, Adi.



---------------------------------------------------------------
Lucram pentru tine. Analizam. Cautam zilnic.
Alegem ceea ce te intereseaza. Te anuntam.
http://www.REDUCERI.ro/


Other related posts: