Re: Quartz/memory benchmarks...
Re: Quartz/memory benchmarks...
- Subject: Re: Quartz/memory benchmarks...
- From: Allan Odgaard <email@hidden>
- Date: Thu, 27 Jun 2002 13:44:34 +0200
On torsdag, juni 27, 2002, at 07:24 , Charles Jolley wrote:
After some experimentation I discovered that displaying an NSImage was
apparently well optimized in 10.1,
I did a quick test drawing the same NSImage into my NSView 100 times (in
a loop). It amounted to around 45 MB/s. This was using an
NSCompositeCopy operation, so no pixel composition should happen -- but
I don't know if my NSImage was in my display buffers pixel format, or a
conversion would need to take place each time.
If no conversion needs to take place then this is bad -- I reported that
I could copy 75 MB/s using a normal C loop, but this was actually
without optimizations. With optimizations I can move 170 MB/s (and 290
MB/s with memmove()) -- both of course apply only to moving around
memory in main memory, but probably this is what happens when drawing an
NSView, because it draws to the on screen buffer which would appear to
be in main memory.
so I set about trying to find a way to draw these complex subviews into
an offscreen image and then to substitute the offscreen image for
actual drawing during key
Now I did read that a graphics context could be the screen, a pdf file
or even a bitmap image (which you could then use) -- problem is, I only
see ways to create PS and PDF graphics contexts...
Well, I finally got something that seems to work "well enough," but I
am not satisfied by it at all. Cocoa drawing would be much easier to
optimize if there was just some way to have a view produce an NSImage
of itself and its subviews.
Well, smooth scrolling the contents of a full screen window even with
the contents cached in an image seems to be impossible on my machine.
But let's see what happens with Quartz Extreme -- if all images gets
moved to video memory, and the on board blitter is used, then we should
hopefully see speeds near the 2.7 GB/s that NVIDEA list as the bandwidth
of their Mac version of GeForce II, rather than the current <100 MB/s
that haunt my system...
But I really wonder why Apple would first add such a feature a year
after their initial relase of the OS -- I further low the marketing hype
behind calling this "extreme" and "hardware accelerated" -- from what i
can tell, Quartz Extreme will just provide us with what my Amiga has
been done for 16 years... arg...
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.