| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
The drawRect method of my custom view draws many elements (100's to
100,000) and each element has a stroke method. Drawing these elements
is twice as slow in Cocoa app then in prior version of the app in
Carbon. But it is much worse --- most of the graphics time in Cocoa is
taken by filling a rectangle with a color and that graphics call
(NSRectFill()) is TEN times slower than the comparable Carbon
FillRect(). Is there any way to speed up graphics in Cocoa?
Spool data from files: Cocoa - 8.9 sec Carbon - 9.0 sec
Fill Rectangles: Cocoa - 17.9 sec Carbon - 1.8 sec
Other stuff: Cocoa - 0.5 secs Carbon - 1.0 sec
Total time: Cocoa - 27.3 secs Carbon - 12.8 sec
Thus Carbon and Cocoa are identical except in NSFillRect() vs
FillRect() which differ by factor of 10?
| References: | |
| >Cocoa graphics speed (From: John Nairn <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.