Multithreading performance on OSX

View: New views
1 Messages — Rating Filter:   Alert me  

Multithreading performance on OSX

by LKeene :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Has anyone noticed very poor multithreading performance on Mono + OSX? I've been slowly zeroing in on bottlenecks in my code. I'm doing a lot of graphics operations by writing to a buffer with multiple threads, and then drawing via DrawImageUnscaled. This is working extremely well in Linux and Windows, but OSX is slow to the point that it cannot be used i.e. the user interface becomes unresponsive. I've tried it with all drawing turned of - just worker threads writing to the buffer - and the performance is very poor indeed, which indicates it's not a problem associated with the graphics.DrawImageUnscaled call. For synchronization I'm using "Interlocked.Increment(ref var)" in my worker threads, and the calling thread waits for completion via "WaitHandle.WaitAll(...)". Are these synchronization objects potentially the problem here?

I'd like to hear from anyone who's done multithreading on Mono + OSX. I'd sure like to get to the bottom of this. My app is unuseable on Mac as is.

P.S. - I also posted about a gigantic bottleneck in "ReaderWriterLock" object on OSX. Anyone else had this problem?