Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
- Subject: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
- From: John Fox <email@hidden>
- Date: Fri, 11 Feb 2005 08:47:43 -0800
Hi Michael:
After much work, I managed to create a very satisfactory iPhoto-like
scaling thumbnail display. I never dropped down to the Quartz 2D layer
for drawing because (a) I don't anything about it, and (b) it hasn't
seemed necessary.
The way I got good performance from beginning to end is to use a
mutable dictionary to store the NSBitmapReps. In my drawRect: method I
only ever draw images that are currently visible in the my clipView.
Drawing as little as possible is always a good thing, and sometimes
easy to overlook. Finally, I archive the dictionary so that when my app
starts, I don't have to create the bitmap reps over and over again. In
fact, if you look inside the iPhoto library folder, you can see that
there are two archives of bitmap reps in small and large sizes.
All this said, it's quite possible that using the Quartz 2D drawing
methods will yield another speed boost, but I wanted to share with you
and the list what I've found.
Hope this helps,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden