[interfacekit] Re: PortLink(NG)

Pahtz <pahtz@xxxxxxxxxxxx> wrote:

> Ok, I just typed this into vi. I haven't compiled it a single time.
> 
> I rewrote PortLink as a merge of PortLink, PortMessage, and BSession 
> functionality.
I didn't do that. I was doing other stuff, not reinventing something that 
others have been doing.

> PortMessage will have to modified slightly for consistency. PortQueue should 
> also end up using
> PortLink(NG) internally.
Do we need all this classes?

> You will see buffers are reused, but will be dynamically resized if a big 
> whopping message comes
> along. Perhaps something should be added to shrink the buffers after a while.
You *MUST* shrink buffer if you enlarge them. (Or you could simply use a 1 MB 
static buffer,
but that will have a huge latency)

> I actually read the dynamic resizing debate but I don't think it ended in 
> agreement. I will read
> it again.
It wasn't done as far as I remeber. I would rather see a working app server 
with complete
BWindows/BView support, then spending time on writing emails.

> But as Axel just said, port_write() is slow, so it's better to port_write() a 
> big chunk in one go
> instead of streaming little packets. I dynamically resize to fit large 
> messages in one go instead
> of multipart'ing it.
Yes he is right, but it's also very important to not buffer to much, or you 
will get a high latency
in your communication with the server, slowing it down.

Marcus

Other related posts: