Xcode running slow

Discussion in 'iOS Programming' started by rogelio75, Jun 14, 2017.

  1. rogelio75 macrumors newbie

    Jun 14, 2017
    I have an app with over 200 UIView Controllers and it runs really slow, why?

    I have the Mac Pro Cylinder:

    3.5GHz 6-Core Intel Xeon E5

    16GB 1866Mhz DDR3 ECC memory

    GDDR5 VRAM each

    512 PCIe-based flash storage

    AMD FirePro D700

    All help is appreciated,

    Thank you!
  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    What part runs slow? Xcode or the app on a device?

    If it's the app on a device you should start with Instruments and profile the application.

    If it's Xcode then having a storyboard with 200 view controllers is a lot. I would consider breaking it down into separate storyboards with maybe 20 or 30 scenes in each. Reducing the number of scenes per storyboard might improve the speed of the app on the device also.
  3. bjet767 macrumors 6502a

    Oct 2, 2010
    Are you writing about the simulators or a real device. They run a little different and yes 200 uiviewcontrollers says you are missing something in your programming.

    Think of a uiviewcontroller as an app within an app and if you need more uiviews then add them as needed via sub views. But in reality even an OSX program or app doesn't need that many views normally.
  4. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    Be specific.

    If Xcode: Is it compile times, interacting with the editor, xib or storyboard files, the visual debugger? Define what you think is slow.

    If your app runs slow, that is likely some poor setup or design issue. You'll have to be very descriptive to gain any insight from a forum like this. It may be best to higher a very experienced iOS developer for a few days of consulting.
  5. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    I have discovered that if you are editing a source file in Xcode, you should NOT simultaneously be editing or even looking at a Storyboard/xib file. If you try to have both open at the same time, the Swift autocorrect crashes all the damn time. It's unbelievably annoying.
  6. Zazoh macrumors 6502a


    Jan 4, 2009
    San Antonio, Texas
    May want to rethink your design.
  7. RCS31 macrumors 6502


    Jun 28, 2013
    Looking for a place of freedom and rationality
    Just out of curiosity, what in the world do you need 200 VCs for??? The most complex and advanced iOS apps don't even come close to that number...
  8. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    Since the OP hasn't returned, I think responding further to them is wasted effort.

    The argument that 200 VCs is somehow bad doesn't take onto account a complicated app or the fact that VCs can be used for more than just full screens. For instance the app I'm currently working on has many view controllers that are used for sections within a screens and as complicated table view cells. The total VC count is well over 100 and we don't have performance issues.

Share This Page