[Vm-dev] Mars, stuck on callbacks (again)... need opinions

Andreas Raab andreas.raab at gmx.de
Thu Dec 23 20:23:22 UTC 2010


Esteban -

My recommendation would be to try to port the minimal necessary subset 
of your application to Alien and see if that actually addresses your 
needs. This should be fairly straightforward - extracting the pointer 
addresses out of FFI handles and sticking them into an Alien isn't 
difficult.

In fact, I would probably go as far as saying that you might want to try 
to make a test case for the specifics of your situation (i.e., the 
minimal necessary subset to test the table renderer callback interface). 
Then you can run benchmarks on it. I'm pretty certain that there's 
probably some low-hanging FFI fruit as well that might be more easily 
visible within such a benchmark.

Cheers,
   - Andreas

On 12/23/2010 11:35 AM, Esteban Lorenzano wrote:
>
> Hi guys,
> I'm doing some "advance callbacks" for Mars, and I'm having several problems with table renderers (they are called A LOT of times and needs to be efficient). The ObjectiveCBridge is not as efficient as that calls needs to be executed, and well... I was planing to spend some time on this, trying to see how can I improve the callback velocity. And then a question came to my mind:
>
> do I spend time improving current ObjectiveCBridge implementation... or I better use Alien and migrate everything to it?
>
> some context:
>
> 1) it was always planned to "sonner or latter" migrate the ObjectiveCBridge stuff to alien (there is another .
> 2) Alien is not working -yet- for iPhone. It is planned (bah... it is "thought") to run Alien in iPhoneVM too.
> 3) Alien callback implementation is a lot cleaner than the current ObjectiveCBridge implementation (which relies on both sides semaphores, when alien callbacks relies on "image ownership")
>
> So... it will delay a little a release of Mars? sure it will... but in the long way it will be better.
>
> I would like to hear your opinions,
>
> cheers,
> Esteban


More information about the Vm-dev mailing list