Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3428496
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:57:58+00:00 2026-05-18T06:57:58+00:00

I guess this problem is really about performance, but I’m trying to get a

  • 0

I guess this problem is really about performance, but I’m trying to get a rough sanity check as well.

I display a map view (although whether it’s a map view or something else could change, and I hope is immaterial), and on top of the map view I have a transparent view subclass. In this view’s drawRect: method I draw on the view using core graphics calls; circles, gradients, etc. What I’m drawing isn’t super complicated, but it’s not trivial. Then, I have an NSTimer that fires every X seconds, calling [myview setNeedsDisplay] each time, and what it draws changes at every time step (circles get bigger, colors and gradients change, etc).

Is this the right way to go for doing this type of vector-based animation? I’m getting very low performance X seems to be effectively no better than about 0.25. I’d like 0.05 or smaller. Is there some other way to do things? I have the feeling that I’m either strategically way off, or this is futile. I can do things with CoreAnimation – for example grow and shrink pictures and such, and it’s very fast (why?), but it doesn’t give me the control I want…

MORE INFO: reducing drawing complexity (fewer circles, gradients, so forth) does speed up drawing significantly, but I have to draw almost nothing to get smooth animation. Is this NSTimer strategy even the right way to go? Is there some other way to do animate vector drawing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:57:58+00:00Added an answer on May 18, 2026 at 6:57 am

    Is it possible that you could leverage some Core Animation to perform some/all of the animations? For example, rather than redrawing a circle that’s changing in size, just render it as one size and animate a scale transform on it? If you only have a couple of objects animating, you could try adding each as a sublayer of your view, and then batching together some Core Animation animations rather than attempting to redraw everything manually. If you look at the blue circles in Apple’s Maps app, when they radiate outwards (while getting a fix), you can see that they start out sharp and get a bit blurry as then grow. It works fine for the purpose, and I suspect they are just scaling a small circular image. Would that sort of thing work for your app?

    It’s hard to say what may improve performance without a better idea of what animations you’re performing. Is that something you could elaborate upon?

    (I would have posted this as a comment, but I am just shy of the required reputation for that)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, I guess this is entirely subjective and whatnot, but I was thinking about
I'm learning about POSIX threads right now, but I guess this is just a
Well, I guess this day had to come. My client's website has been compromised
Ok another WPF question, well I guess this is just general .NET. I have
I guess the topic says it. I have tried googling this, but havent gotten
I routinely run into this problem, and I'm not sure how to get past
I guess this is an odd one, and the answer is most likely it
I have a HashMap (although I guess this question applies to other collections) of
I am busy writing my thesis (so, I guess this could count as a
I guess I'll illustrate with an example: In this game you are able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.