Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re[2]: Mac OS X Java Performance



On Monday, July 28, 2003, at 08:21 PM, Lucas Holt wrote:
You do have some valid points, but I think that drawing in mac os x would be slow in all applications if that were the only bottleneck.

People writing native Mac OS X applications generally work within the platform's performance characteristics, rather than against them.

For example, you generally don't see Cocoa applications that do their own double-buffering. Why? Because when you're writing a Cocoa application, you know that you don't need to do it in the first place.

On the other hand, there are many AWT & Swing applications that lose speed due to needless double-buffering on Mac OS X. They may need to do it on other platforms, and it will *work* on Mac OS X, but it will not perform as well as not doing it. And this isn't really something Apple can fix unless they add an unbuffered window mode to the window server (which has very wide-ranging implications).

And actually, drawing in Mac OS X *can* be slow if you try to misuse it. For instance, I believe drawing a polygon in Quartz can be an O(n^2) or O(n^3) operation because, in order to do proper alpha compositing and not "build up" paint at self-intersections, the polygon drawing code needs to do all sorts of intersection tests. Less full-featured graphics architectures that don't support full alpha compositing don't need to do this. If you need fast opaque unfilled polygon drawing, the way to do it is by drawing lots of lines. And so on.

You have to understand the performance characteristics of the platform you're targeting and work within them, whatever platform and technology you're using.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Re[2]: Mac OS X Java Performance (From: Lucas Holt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.