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 686945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:04:35+00:00 2026-05-14T02:04:35+00:00

Today I encountered something strange: I tried to put a utility method into an

  • 0

Today I encountered something strange: I tried to put a utility method into an Utility class as a class method, so that I can simply call that method to generate me an convenient UIView with no hassle (not the imageNamed method but the other, much more complex one). It was horrible. The performance was so incredible bad. Then I made an instance method out of it, created an instance of that class and called the instance method. Performance was suddenly great. That is so strange!

What are your experiences with this kind of stuff?

  • 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-14T02:04:35+00:00Added an answer on May 14, 2026 at 2:04 am

    There’s something else going on in your case. Method calls are pretty lightweight, and I doubt there is a noticeable difference in performance between a class method and an instance method. At least, I’ve never seen a difference between the two in my experience.

    Sources of performance degradation are often not what they first appear to be, so I recommend running your application against Instruments or Shark to see where the bottleneck is in this case. My guess is that you are allocating memory in the class method approach that was not allocated in the instance method, which is one of the most expensive operations on the iPhone.

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

Sidebar

Related Questions

I encountered a strange problem today. Whenever i put a breakpoint in one of
I ran into something odd today that maybe someone knows something about. I have
Today when I was in computer organization class, teacher talked about something interesting to
I just encountered a strange behaviour with the GregorianCalendar class, and I was wondering
I've been writing code for ASP.NET since the start, and today I encountered something
Today, I encounter a strange problem. My c++ code can work under debug mode.
Today I encountered the following situation: (pseudo code) class MyClass { public void workOnArray(Object[]
Today I was faced with the method constructServiceUrl() of the org.jasig.cas.client.util.CommonUtils class. I thought
Today I encountered interesting issue. That's what I have: 2 images with humanoids on
Today, I ran into this weird problem with a user using Mac OS X.

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.