objective c - Fast drawing using NSBezierPath drawing at least 4000 segments -
i'm trying draw 4000-10000 segments using nsbezierpath on every drawrect of nsview (about 300x300 pixel box). resource heavy , taking lot time draw (relatively long).
can suggest substitute this? i've tried using single nsbezierpath 1000 segments @ time, it's still resource heavy.
i'm looking possible alternatives. i'm sure opengl faster, don't know if have learn new platform in order need. i'm open suggestions.
not answer, test results
i did simple experiment mathematica. experiment gives absolute upper bound time, since used no optimization, no gpu, interpreted language, etc. think more 1 order of magnitude achievable.
results:
generating 10.000 bezier curves list
b = table[ {hue[randomreal[]], beziercurve@randomreal[{0, 300}, {4, 2}]}, {10000}];
is quick, because mathematica not evaluate nothing.
now rendering:
h1 = absolutetime[]; print@graphics[b]; h2 = absolutetime[]; print[h2 - h1]; time spent 11.8 secs
result:
ps: intention set timing baseline our mindset.
Comments
Post a Comment