Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Re: Mac port: Status Update


Wow! It really uses reflect? That can't be good for performance.

McQ.



stuartc@xxxxxxx
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

12/10/2001 10:27 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [platform-swt-dev] Re: Mac port: Status Update



> Besides, going through all the voodoo to get the Obj-C code to talk to
> Java
> through JNI (and do it better than Apple can) would take a pretty large
> undertaking that would offset any gains we get by using the Cocoa API's.

The major difference is that the JavaBridge is primarily dynamic code,
i.e. it's generated through a mapping declaration (from what I
understand).  So it leverages reflection most of the time.  And it's
two-way.   A JNI mapping would be just a static wrapper around the ObjC
classes with some hooks for doing NSNotificationCenter and NSEvent
callbacks.

We wouldn't have to marshal objects back and forth between Java/ObjC, at
best we'd have to keep pointer references to ObjC classes, which is
effectively what the SWT Win32 port is doing in places.

Anyhow, I've been working in my spare time at writing a JNI wrapper
around the Foundation & AppKit classes you used in your BlackMoon
example...  to see if it'll exhibit the same crash behavior...  we'll
see how far I get. <grin>

Cheers
Stu

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top