[interfacekit] Re: BHandler::fToken

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: interfacekit@xxxxxxxxxxxxx
  • Date: Mon, 10 Mar 2003 23:44:23 +0100 CET

Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx> wrote:
> > When a BView is created, and attached to a window, a command is 
> > send, and a
> > server=5Ftoken is returned, this token is then used to control the 
> > ServerView.
> > In this case the server=5Ftoken is not sent with every command, but a
> > set=5Fcurrent=5Fview command is sent if the view which we are going to 
> > work with
> > changes (on the client-side BWindow->fLastViewToken, keeps the 
> > current
> > view), this reduces command size overhead.
> Mmh, I wonder whether 4 bytes for the token would be of any 
> significance.
> At least performance-wise the, at least two, syscalls to deliver the
> set=5Fcurrent=5Fview command should outweigh the additional overhead for
> copying of hundreds of tokens.

They shouldn't matter much, that's right - but of course, everything 
adds up, so saving some copies could also save some time :-)
But sending additional data should be always cheaper than managing 
another structure on the client-side.
But I would probably try to use shared memory for the IPC - as long as 
the kernel doesn't provide that feature built-in. We could do the same 
for big BMessages as well.
Of course, we could also just add this feature to the kernel as well - 
but it should be controllable by the applications involved (so a user-
space implementation would also make sense [if it would be in a library 
usable by everyone]).

Adios...
   Axel.



Other related posts: