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

  • SEARCH
  • Home
  • 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 8911231
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:53:23+00:00 2026-06-15T03:53:23+00:00

Exactly what performance-critical things should I have an eye out for? I want a

  • 0

Exactly what performance-critical things should I have an eye out for?

I want a list with as many examples as possible. Or a list of best practices.

  • 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-06-15T03:53:24+00:00Added an answer on June 15, 2026 at 3:53 am

    Offscreen rendering / Rendering on the CPU

    The biggest bottlenecks to graphics performance are offscreen rendering and blending – they can happen for every frame of the animation and can cause choppy scrolling.

    Offscreen rendering (software rendering) happens when it is necessary to do the drawing in software (offscreen) before it can be handed over to the GPU. Hardware does not handle text rendering and advanced compositions with masks and shadows.

    The following will trigger offscreen rendering:

    • Any layer with a mask (layer.mask)

    • Any layer with layer.masksToBounds / view.clipsToBounds being true

    • Any layer with layer.allowsGroupOpacity set to YES and layer.opacity is less than 1.0
      When does a view (or layer) require offscreen rendering?

    • Any layer with a drop shadow (layer.shadow*).
      Tips on how to fix: https://markpospesel.wordpress.com/tag/performance/

    • Any layer with layer.shouldRasterize being true

    • Any layer with layer.cornerRadius, layer.edgeAntialiasingMask, layer.allowsEdgeAntialiasing

    • Any layer with layer.borderWith and layer.borderColor?
      Missing reference / proof

    • Text (any kind, including UILabel, CATextLayer, Core Text, etc).

    • Most of the drawings you do with CGContext in drawRect:. Even an empty implementation will be rendered offscreen.


    Blending

    • resizableImage can cause blending.
      Avoiding blended layers when using resizableImages on iOS

    • Any layer which is not opaque and has a backgroundColor with alpha less than 1.0

    • Any layer with alpha less than 1.0

    • Any layer with layer.content or any UIImageView with a UIImage having an alpha channel


    Layout

    The following things will trigger layoutSubviews to be called on a UIView:

    • Changing bounds triggers on the same view and superview

    • Changing frame triggers on the same view and superview

    • Changing transform or layer.transform triggers on superview

    Note: I’m referring to real changes where values actually are changing

    Contradictory these changes does not trigger layoutSubviews to be called: center, layer.position, layer.zPosition, layer.anchorPoint, layer.anchorPointZ.

    Reference: https://github.com/hfossli/LayoutSubviewsInconsistency


    General tips for improving performance

    • Oftentimes it is better to blend than to render offscreen.

    • Consider using drawRect: instead of having a view with multiple labels and subviews.

    • Draw on a background queue to a UIImage or CGImageRef.

    • Draw to a CGLayer (which is cached better on GPU compared to UIImage), and draw whatever you want into it.
      Update, don’t: http://iosptl.com/posts/cglayer-no-longer-recommended/

    • Flatten your hierarchy

    • Reuse views – don’t create and add new ones while scrolling

    • Have opaque views with solid background color

    • Avoid setting alpha and layer.opacity to less than 1.0

    • Enable layer.shouldRasterize (use with care). I like to avoid this personally, but it performs faster in some occasions since rasters of the layer will be cached and reused. Remember if you enable shouldRasterize on layers that changing their content or sublayers contents frequently will cause the performance to drop, since iOS will keep rasterizing the layer on each change.


    Links

    • http://iosinjordan.tumblr.com/post/56778173518/help-my-tables-dont-scroll-smoothly

    • https://developer.apple.com/library/IOS/documentation/2DDrawing/Conceptual/DrawingPrintingiOS/DrawingTips/DrawingTips.html

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

Sidebar

Related Questions

Questions exactly like this have been asked before, i've read them all and tried
What exactly needs to happen in order to get detailed SQL logs out of
Note: I know exactly what a property is. This question is about performance. Using
What exactly are performance counters and how do they work? Are they specific to
What exactly are mock tests...I need to know the mock and performance tests available
I want to get specific informations about performance from Perfmon via Powershell and write
After going through few articles about performance, Not able to get this statement exactly.
Before the performance people tear my head off: yes, I have done profiling before
I have a sql server 2000 database with some serious performance problems, as well
How can I test performance of an asp.net mvc application and understand where exactly

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.