• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?


  • Subject: Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
  • From: Michael Becker <email@hidden>
  • Date: Sun, 13 Feb 2005 02:46:01 +0100

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.

I am doing the same right now, and it works great when I am scrolling the view, because only the images that appear at the top or bottom are being redrawn. What bothers me, though, is the fact that when I zoom out far enough to make the images very small, performance is going down because I have to draw, say, 50 BitmapImageReps and no matter how small they are, they're still being resized and drawn.


My idea now is to specify certain thresholds where the images get recached in different sizes. So if you zoom them smaller than 100 pixels wide, the image gets recached in a 40 pixels wide format... I am not sure.

The one thing that I don't yet fully understand is, how iPhoto creates this "delayed quality improvement" thing. That means, if you zoom the images, their quality is fairly bad, but gets automatically updated after a couple of moments.

Besides: I noticed why my Quartz was slower. I didn't cache the images, so the JPEG data was being decoded on each redraw. I fixed that with the help of the Quartz-dev mailinglist.

Cheers,
Michael

_______________________________________________
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


  • Follow-Ups:
    • Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
      • From: Andy Armstrong <email@hidden>
    • Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
      • From: Chilton Webb <email@hidden>
    • Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
      • From: Ricky Sharp <email@hidden>
References: 
 >Pure Quartz vs. Cocoa-Objects ... why is Quartz slower? (From: John Fox <email@hidden>)

  • Prev by Date: Re: A few questions about Memory Management
  • Next by Date: Background threading in an NSView?
  • Previous by thread: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
  • Next by thread: Re: Pure Quartz vs. Cocoa-Objects ... why is Quartz slower?
  • Index(es):
    • Date
    • Thread