Consider writing a mach_port_t IPC backend for OSX




5 years ago
3 years ago


(Reporter: mattwoodrow, Unassigned)


Firefox Tracking Flags

(Not tracked)




5 years ago
When sharing IOSurfaces between processes (what we use for WebGL and plugins) we currently mark them as global, so that they can be looked up by ID number from any process in the system.

A better solution would be to use mach ports for our IPC code, because this supports proper ownership transfer/sharing, similar to passing file descriptors via POSIX sockets.

It appears that the chromium guys wrote a prototype for this, and abandoned it because OSX 10.5 didn't support a feature that they needed (EVFILTER_MACHPORT).

They also did seem in depth performance measurements, and found them to be faster than sockets. Their initial descriptor says that the wins are negligible, but the actual numbers show them to be 150% - 1000% faster than FIFO sockets for the packet sizes that they frequently see.


The remaining issue I see is passing filedescriptors across processes. Comment 4 in the chromium bug has a solution, but it might be Lion (10.7) only.
You need to log in before you can comment on or make changes to this bug.