Re: performance of NSBezierPath
Re: performance of NSBezierPath
- Subject: Re: performance of NSBezierPath
- From: Dennis De Mars <email@hidden>
- Date: Sun, 7 Apr 2002 09:56:01 -0700
On Sunday, April 7, 2002, at 09:17 AM, Shawn Erickson wrote:
On Sunday, April 7, 2002, at 08:30 AM, ruediger schmidt wrote:
Hi,
just tested the performance of NSBezierPath because I'm thinking
about a
graphic app where polygons with a lot of points ( up to 20000 ) will
be common.
I did the testing with a NSBezierPaths with random points in the rang
0,200,0,300.
For paths with more then 1500 I had to wait more then 1 minute (G4,
400 MHz) and
even on a new dual G4 it was slow.
My question is: Did some one else had same results? Is there a pitfall
witch causes
this poor performance? Is there a easy way to improve performance
significantly beside using OpenGL witch gives good results?
If it's not my fault is there a chance that apple will fix this (bug)?
When you say "polygons" are you meaning shapes with straight lines
between an array of points? Or something more complex?
NSBezierPath is a very capable class (lines, curves, rounding, etc.)
and this may be causing the slow down you are seeing. It wouldn't be
very hard to define you own polygon class that keeps a ordered
collection of points and uses Quartz to draw them. This could skip some
of the overhead in NSBezierPath (not that someone might know how to
better utilize it).
Other possible explanations are:
1) When NSBezierPath uses Quartz to draw the path, it does
resolution-independent rendering including anti-aliasing. I'll show my
ignorance of OpenGL here, but maybe the OpenGL version doesn't do this,
or at least doesn't do it by default?
2) If it's a new dual-CPU machine, it has a pretty good graphics
accelerator. It's possible that OpenGL is tuned to take advantage of the
hardware acceleration to a greater extent than Quartz is.
- Dennis D.
_______________________________________________
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.