Re: optimization time !
Re: optimization time !
- Subject: Re: optimization time !
- From: Ali Ozer <email@hidden>
- Date: Fri, 6 Jul 2001 18:02:14 -0700
Just to understand: You are in a drawRect: routine, and you are drawing
using, what, CG routines, or NSBezierPath, ? Are you animating, moving
the map, etc, or is just the static draw of one frame slow?
Use Sampler to see where most of the time is being spent. One good way
to do this might be to draw your map in a loop many times and sample a
section of that. Sampler won't tell you if you're doing something silly
like drawing the thing over and over several times by mistake, but it
will point out the hot spots ("80% of the time is in drawing the text",
or whatever). You can also use QuartzDebug to check out the
update/flush regions.
Ali
On Friday, July 6, 2001, at 04:40 , Candide Kemmler wrote:
Hi !
And first a big thank you for all your help. I now have a first
appreciable result. I have my maps generated and the rendering is very
acceptable. A few things to settle and it will be just OK.
The big problem is still performance. I insist that there is not a line
of Java code in my program. I just gave up with this. It is all written
in Objective-C/C. But, because I just began learning those languages
last week, it could well be a matter of code...
BTW, I put an example map at the following address:
http://fractals.be:8080/examples/map.pdf
I noticed one thing: the more the moveTo's, lineTo's, the slower the
routine. I can't believe it ! Such basic things had to be lightning
fast ! And when there's text involved, things are even worse. The
database access is just fast (MySQL) and even when the data's cached,
the rendering is still slooow.
Any tricks known around to make drawing things like maps faster ???
Candide
PS: the same maps (exactly the same :-) are generated to .swf
(Macromedia Flash) by my server. They draw MUCH faster on-screen. But
there the server-side generation takes time... I guess there are good
hackers at Macromedia.
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev