Based on my implementation of Gears IPC on MacOSX, I found out that
the perf of FIFO implementation is not as good as the one using Mach
port, especially for big message. For example,  Gears IPC unitest
takes around 60 seconds to finish in a Tiger machine, compared with
around 10 seconds by using Mach port. One reason for this slowdown is
that the PIPE_BUF (the size to guarantee the atomic write and read) is
512 on OSX, which is far less than the one in Linux.

However, after talking with Greg and other people, I ended up with
using FIFO instead of Mach port because:
1) Mach port is not a recommended or officially supported OSX API.
2) The named pipe implementation makes us be able to re-use the IPC
code we did for Linux and it lies in our performance constraint.

I am not sure about the perf requirement for Chrome. If we really care
about perf, probably Mach port, or Cocoa Distributed Object. It is
said that Cocoa DO is a very nice high-level API that can give you
very efficient two-way IPC.


On Nov 5, 6:43 pm, Wan-Teh Chang <[EMAIL PROTECTED]> wrote:
> On Wed, Nov 5, 2008 at 5:26 PM, Darin Fisher <[EMAIL PROTECTED]> wrote:
> > Sorry to be so persistent, but I don't understand why you need those things.
> >  Can you provide some specific examples?
> > As far as I know, we need the ability to have shared memory.  It seems like
> > we can do that with mmap.  We need a way to have shared waitable events
> > (like windows event objects), and that can be done using a connected
> > anonymous pipe.  In both of those cases, we have something that is a file
> > descriptor that can be shared by simply writing the FD over the pipe.  What
> > am I missing?
>
> I agree that an anonymous pipe is a great solution.  Its only drawback is
> that we won't be able to implement the --start-renderers-manually and
> --channel command line options, which require the IPC channel to have
> a name.
>
> Wan-Teh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Chromium-dev" group.
To post to this group, send email to chromium-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/chromium-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to